VertexSchematic

Package: Libraries.Game.Graphics · Inherits from: Libraries.Language.Object

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.

Actions

GetColor()

This will return the color of the VertexSchematic. This will return a Color object, even if HasColor returns false.

Returns

Libraries.Game.Graphics.Color

GetNormal()

This will return the normal of the VertexSchematic. This will return a Vector3 object, even if HasNormal returns false.

Returns

Libraries.Compute.Vector3

GetPosition()

This will return the position of the VertexSchematic. This will return a Vector3 object, even if HasPosition returns false.

Returns

Libraries.Compute.Vector3

GetTextureCoordinates()

This will return the texture coordinates of the VertexSchematic. This will return a Vector2 object, even if HasTextureCoordinates returns false.

Returns

Libraries.Compute.Vector2

HasColor()

Returns whether this VertexSchematic currently has a color.

Returns

boolean

HasNormal()

Returns whether this VertexSchematic currently has a normal.

Returns

boolean

HasPosition()

Returns whether this VertexSchematic currently has a position.

Returns

boolean

HasTextureCoordinates()

Returns whether this VertexSchematic currently has texture coordinates.

Returns

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

Returns

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

Returns

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

Returns

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

  • red number
  • green number
  • blue number
  • alpha number

Returns

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

Returns

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

Returns

Libraries.Game.Graphics.VertexSchematic

SetNormal(number x, number y, number z)

Sets the normal of the VertexSchematic, and returns it for chaining.

Parameters

  • x number
  • y number
  • z number

Returns

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

Returns

Libraries.Game.Graphics.VertexSchematic

SetPosition(number x, number y, number z)

Sets the position of the VertexSchematic, and returns it for chaining.

Parameters

  • x number
  • y number
  • z number

Returns

Libraries.Game.Graphics.VertexSchematic

SetTextureCoordinates(number u, number v)

Sets the texture coordinates of the VertexSchematic, and returns it for chaining.

Parameters

  • u number
  • v number

Returns

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.

Parameters

Returns

Libraries.Game.Graphics.VertexSchematic

Inherited Actions

3 actions from Libraries.Language.Object