ObjVertexColor

Inheritance: java.lang.Object, ObjVertex

The OBJ vertex (position and color).

Constructors

ConstructorDescription
ObjVertexColor(float x, float y, float z, float r, float g, float b)Initializes a new instance of the ObjVertexColor class.

Methods

MethodDescription
getR()Gets the red component.
getG()Gets the green component.
getB()Gets the blue component.
op_Equality(ObjVertexColor a, ObjVertexColor b)Overloading the equality operator.
op_Inequality(ObjVertexColor a, ObjVertexColor b)Overloading the inequality operator.
equals(Object obj)Indicates whether the current object is equal to another object.
equals(ObjVertexColor other)Indicates whether the current object is equal to another object of the same type.
hashCode()Gets hash code.

ObjVertexColor(float x, float y, float z, float r, float g, float b)

public ObjVertexColor(float x, float y, float z, float r, float g, float b)

Initializes a new instance of the ObjVertexColor class.

Parameters:

ParameterTypeDescription
xfloatThe x coordinate.
yfloatThe y coordinate.
zfloatThe z coordinate.
rfloatThe red component.
gfloatThe green component.
bfloatThe blue component.

getR()

public final float getR()

Gets the red component.

Returns: float

getG()

public final float getG()

Gets the green component.

Returns: float

getB()

public final float getB()

Gets the blue component.

Returns: float

op_Equality(ObjVertexColor a, ObjVertexColor b)

public static boolean op_Equality(ObjVertexColor a, ObjVertexColor b)

Overloading the equality operator.

Parameters:

ParameterTypeDescription
aObjVertexColorThe first instance.
bObjVertexColorThe second instance.

Returns: boolean - The value indicating whether instances are equal.

op_Inequality(ObjVertexColor a, ObjVertexColor b)

public static boolean op_Inequality(ObjVertexColor a, ObjVertexColor b)

Overloading the inequality operator.

Parameters:

ParameterTypeDescription
aObjVertexColorThe first instance.
bObjVertexColorThe second instance.

Returns: boolean - The value indicating whether instances are not equal.

equals(Object obj)

public boolean equals(Object obj)

Indicates whether the current object is equal to another object.

Parameters:

ParameterTypeDescription
objObjectAn object to compare with this object.

Returns: boolean - true if the current object is equal to the obj parameter; otherwise, false.

equals(ObjVertexColor other)

public final boolean equals(ObjVertexColor other)

Indicates whether the current object is equal to another object of the same type.

Parameters:

ParameterTypeDescription
otherObjVertexColorAn object to compare with this object.

Returns: boolean - true if the current object is equal to the other parameter; otherwise, false.

hashCode()

public int hashCode()

Gets hash code.

Returns: int - The int .