Libraries.Game.Graphics.VertexSchematic Documentation
The VertexSchematic class holds a sort of blueprint for an individual vertex. It is used during construction by the MeshBuilder and ModelBuilder classes. Most users should never need to use this class directly.
Inherits from: Libraries.Language.Object
Summary
Actions Summary Table
Actions | Description |
---|---|
Compare(Libraries.Language.Object object) | This action compares two object hash codes and returns an integer. |
Equals(Libraries.Language.Object object) | This action determines if two objects are equal based on their hash code values. |
GetColor() | This will return the color of the VertexSchematic. |
GetHashCode() | This action gets the hash code for an object. |
GetNormal() | This will return the normal of the VertexSchematic. |
GetPosition() | This will return the position of the VertexSchematic. |
GetTextureCoordinates() | This will return the texture coordinates of the VertexSchematic. |
HasColor() | Returns whether this VertexSchematic currently has a color. |
HasNormal() | Returns whether this VertexSchematic currently has a normal. |
HasPosition() | Returns whether this VertexSchematic currently has a position. |
HasTextureCoordinates() | Returns whether this VertexSchematic currently has texture coordinates. |
LinearInterpolation(Libraries.Game.Graphics.VertexSchematic target, number alpha) | This action will perform linear interpolation between each of the fields of the VertexSchematic and each matching field of the provided target VertexSchematic using the given alpha value, which must be between 0 and 1 (inclusive). |
Set(Libraries.Game.Graphics.VertexSchematic schematic) | This action will set the VertexSchematic to match the values of the given VertexSchematic. |
Set(Libraries.Compute.Vector3 setPosition, Libraries.Compute.Vector3 setNormal, Libraries.Game.Graphics.Color setColor, Libraries.Compute.Vector2 setTextureCoordinates) | This action sets the position, normal, color, and texture coordinates of the vertex. |
SetColor(number red, number green, number blue, number alpha) | Sets the color of the VertexSchematic, and returns it for chaining. |
SetColor(Libraries.Game.Graphics.Color newColor) | Sets the color of the VertexSchematic, and returns it for chaining. |
SetNormal(Libraries.Compute.Vector3 vector) | Sets the normal of the VertexSchematic, and returns it for chaining. |
SetNormal(number x, number y, number z) | Sets the normal of the VertexSchematic, and returns it for chaining. |
SetPosition(Libraries.Compute.Vector3 vector) | Sets the position of the VertexSchematic, and returns it for chaining. |
SetPosition(number x, number y, number z) | Sets the position of the VertexSchematic, and returns it for chaining. |
SetTextureCoordinates(number u, number v) | Sets the texture coordinates of the VertexSchematic, and returns it for chaining. |
SetTextureCoordinates(Libraries.Compute.Vector2 vector) | Sets the texture coordinates of the VertexSchematic, and returns it for chaining. |
Actions Documentation
Compare(Libraries.Language.Object object)
This action compares two object hash codes and returns an integer. The result is larger if this hash code is larger than the object passed as a parameter, smaller, or equal. In this case, -1 means smaller, 0 means equal, and 1 means larger. This action was changed in Quorum 7 to return an integer, instead of a CompareResult object, because the previous implementation was causing efficiency issues.
Example Code
Object o
Object t
integer result = o:Compare(t) //1 (larger), 0 (equal), or -1 (smaller)
Parameters
- Libraries.Language.Object: The object to compare to.
Return
integer: The Compare result, Smaller, Equal, or Larger.
Equals(Libraries.Language.Object object)
This action determines if two objects are equal based on their hash code values.
Example Code
use Libraries.Language.Object
use Libraries.Language.Types.Text
Object o
Text t
boolean result = o:Equals(t)
Parameters
- Libraries.Language.Object: The to be compared.
Return
boolean: True if the hash codes are equal and false if they are not equal.
GetColor()
This will return the color of the VertexSchematic. This will return a Color object, even if HasColor returns false.
Return
Libraries.Game.Graphics.Color:
GetHashCode()
This action gets the hash code for an object.
Example Code
Object o
integer hash = o:GetHashCode()
Return
integer: The integer hash code of the object.
GetNormal()
This will return the normal of the VertexSchematic. This will return a Vector3 object, even if HasNormal returns false.
Return
GetPosition()
This will return the position of the VertexSchematic. This will return a Vector3 object, even if HasPosition returns false.
Return
GetTextureCoordinates()
This will return the texture coordinates of the VertexSchematic. This will return a Vector2 object, even if HasTextureCoordinates returns false.
Return
HasColor()
Returns whether this VertexSchematic currently has a color.
Return
boolean:
HasNormal()
Returns whether this VertexSchematic currently has a normal.
Return
boolean:
HasPosition()
Returns whether this VertexSchematic currently has a position.
Return
boolean:
HasTextureCoordinates()
Returns whether this VertexSchematic currently has texture coordinates.
Return
boolean:
LinearInterpolation(Libraries.Game.Graphics.VertexSchematic target, number alpha)
This action will perform linear interpolation between each of the fields of the VertexSchematic and each matching field of the provided target VertexSchematic using the given alpha value, which must be between 0 and 1 (inclusive). The results of the linear interpolation will be stored in the calling VertexSchematic.
Parameters
Return
Libraries.Game.Graphics.VertexSchematic:
Set(Libraries.Game.Graphics.VertexSchematic schematic)
This action will set the VertexSchematic to match the values of the given VertexSchematic. The action will return this object to allow for chaining.
Parameters
Return
Libraries.Game.Graphics.VertexSchematic:
Set(Libraries.Compute.Vector3 setPosition, Libraries.Compute.Vector3 setNormal, Libraries.Game.Graphics.Color setColor, Libraries.Compute.Vector2 setTextureCoordinates)
This action sets the position, normal, color, and texture coordinates of the vertex. The action will return this object to allow for chaining.
Parameters
- Libraries.Compute.Vector3
- Libraries.Compute.Vector3
- Libraries.Game.Graphics.Color
- Libraries.Compute.Vector2
Return
Libraries.Game.Graphics.VertexSchematic:
SetColor(number red, number green, number blue, number alpha)
Sets the color of the VertexSchematic, and returns it for chaining.
Parameters
Return
Libraries.Game.Graphics.VertexSchematic:
SetColor(Libraries.Game.Graphics.Color newColor)
Sets the color of the VertexSchematic, and returns it for chaining. If the Color is undefined, then this VertexSchematic will be treated as no longer having a color.
Parameters
Return
Libraries.Game.Graphics.VertexSchematic:
SetNormal(Libraries.Compute.Vector3 vector)
Sets the normal of the VertexSchematic, and returns it for chaining. If the Vector3 is undefined, then this VertexSchematic will be treated as no longer having a normal.
Parameters
Return
Libraries.Game.Graphics.VertexSchematic:
SetNormal(number x, number y, number z)
Sets the normal of the VertexSchematic, and returns it for chaining.
Parameters
Return
Libraries.Game.Graphics.VertexSchematic:
SetPosition(Libraries.Compute.Vector3 vector)
Sets the position of the VertexSchematic, and returns it for chaining. If the Vector3 is undefined, then this VertexSchematic will be treated as no longer having a position.
Parameters
Return
Libraries.Game.Graphics.VertexSchematic:
SetPosition(number x, number y, number z)
Sets the position of the VertexSchematic, and returns it for chaining.
Parameters
Return
Libraries.Game.Graphics.VertexSchematic:
SetTextureCoordinates(number u, number v)
Sets the texture coordinates of the VertexSchematic, and returns it for chaining.
Parameters
Return
Libraries.Game.Graphics.VertexSchematic:
SetTextureCoordinates(Libraries.Compute.Vector2 vector)
Sets the texture coordinates of the VertexSchematic, and returns it for chaining. If the Vector2 is undefined, then this VertexSchematic will be treated as no longer having texture coordinates.