Torque 3D - Script Manual: MeshRoad Class Reference

TorqueScript

Main   Class List   Namespace List   Online

MeshRoad Class Reference
[Terrain]

A strip of rectangular mesh segments defined by a 3D spline for prototyping road-shaped objects in your scene. More...

Inheritance diagram for MeshRoad:

List of all members.

Public Member Functions

void postApply ()
 Intended as a helper to developers and editor scripts.
void regenerate ()
 Intended as a helper to developers and editor scripts.
void setNodeDepth (int idx, float meters)
 Intended as a helper to developers and editor scripts.

Public Attributes

MeshRoad

string bottomMaterial
 Material for the bottom surface of the road.
float breakAngle
 Angle in degrees - MeshRoad will subdivide the spline if its curve is greater than this threshold.
string sideMaterial
 Material for the left, right, front, and back surfaces of the road.
float textureLength
 The length in meters of textures mapped to the MeshRoad.
string topMaterial
 Material for the upper surface of the road.
int widthSubdivisions
 Subdivide segments widthwise this many times when generating vertices.
Internal

string Node
 Do not modify, for internal use.

Static Public Attributes

static bool EditorOpen
 True if the MeshRoad editor is open, otherwise false.
static bool isRenderable
 Disables rendering of all instances of this type.
static bool isSelectable
 Disables selection of all instances of this type.
static bool showBatches
 Determines if the debug rendering of the batches cubes is displayed or not.
static bool showRoad
 If true, the road will be rendered. When in the editor, roads are always rendered regardless of this flag.
static bool showSpline
 If true, the spline on which the curvature of this road is based will be rendered.
static bool wireframe
 If true, will render the wireframe of the road.

Detailed Description

A strip of rectangular mesh segments defined by a 3D spline for prototyping road-shaped objects in your scene.

User may control width and depth per node, overall spline shape in three dimensions, and seperate Materials for rendering the top, bottom, and side surfaces.

MeshRoad is not capable of handling intersections, branches, curbs, or other desirable features in a final 'road' asset and is therefore intended for prototyping and experimentation.

Materials assigned to MeshRoad should tile vertically.


Member Function Documentation

void MeshRoad::postApply (  ) 

Intended as a helper to developers and editor scripts.

Force trigger an inspectPostApply. This will transmit material and other fields ( not including nodes ) to client objects.

void MeshRoad::regenerate (  ) 

Intended as a helper to developers and editor scripts.

Force MeshRoad to recreate its geometry.

void MeshRoad::setNodeDepth ( int  idx,
float  meters 
)

Intended as a helper to developers and editor scripts.

Sets the depth in meters of a particular node.


Member Data Documentation

Material for the bottom surface of the road.

Angle in degrees - MeshRoad will subdivide the spline if its curve is greater than this threshold.

bool MeshRoad::EditorOpen [static]

True if the MeshRoad editor is open, otherwise false.

Do not modify, for internal use.

bool MeshRoad::showBatches [static]

Determines if the debug rendering of the batches cubes is displayed or not.

bool MeshRoad::showRoad [static]

If true, the road will be rendered. When in the editor, roads are always rendered regardless of this flag.

bool MeshRoad::showSpline [static]

If true, the spline on which the curvature of this road is based will be rendered.

Material for the left, right, front, and back surfaces of the road.

The length in meters of textures mapped to the MeshRoad.

Material for the upper surface of the road.

Subdivide segments widthwise this many times when generating vertices.

bool MeshRoad::wireframe [static]

If true, will render the wireframe of the road.



Copyright © GarageGames, LLC. All Rights Reserved.