Torque Console Objects 3
From TDN
[edit] Console Objects Fields and Methods Quick Reference Part 3
[edit] FileObject |
Console Method Summaries
close |
isEOF |
openForAppend |
openForRead |
openForWrite |
readLine |
Console Methods
|
close() |
|
Purpose |
|
isEOF() |
|
Purpose |
|
openForAppend( filename ) |
|
Purpose |
|
openForRead( filename ) |
|
Purpose |
|
openForWrite( filename ) |
|
Purpose |
|
readLine() |
|
Purpose |
|
writeLine( text ) |
|
Purpose |
FlyingVehicle
This class is used represent the flying variety of vehicles. It can be used to represent any variety of flying vehicle, including jets, biplanes, or rocket ships. If you do not actually need a flying vehicle, it is suggested that you use the hover vehicle instead which will closely approximate many similar needs.
Fields
| Field Name | Description | Sample or Range |
| disableMove | If set to true, this vehicle will not be allowed to move. | [ false , true ] |
FlyingVehicleData
Fields
| Field Name | Description | Sample or Range |
| autoAngularForce | Angular stabilizer force. This force levels you out when autostabilizer kicks in. | [ 0.0 , 0.inf ) |
| autoInputDamping | Amount by which input is damped to reduce occilations caused by too much input. | [ 0.0 , 1.0 ) |
| autoLinearForce | Linear stabilzer force. This slows you down when autostabilizer kicks in. | [ 0.0 , 0.inf ) |
| backwardJetEmitter | ParticleEmitterData datablock used for the thrust backward jet emitter. Emitter will be attached at node: JetNozzleX. | -- |
| createHoverHeight | If set to true, uses hoverHeight to specify height to hover after creation. | [ false , true ] |
| downJetEmitter | ParticleEmitterData datablock used for the downward thrust jet emitter(s). Emitters will be attached at nodes: JetNozzle2 , and JetNozzle3. | -- |
| engineSound | AudioProfile for engine ambient sound. | -- |
| forwardJetEmitter | ParticleEmitterData datablock used for the forward thrust jet emitter(s). Emitters will be attached at nodes: JetNozzle0 , and JetNozzle1. | -- |
| horizontalSurfaceForce | Wing thrust used in climbing and diving. | [ 0.0 , 0.inf ) |
| hoverHeight | Height to hover at after creation if createHoverHeight is set to true. | [ 0.0 , 0.inf ) |
| jetSound | AudioProfile for engine thrust sound. | -- |
| maneuveringForce | Horizontal thrust force. | [ 0.0 , 0.inf ) |
| maxAutoSpeed | Autostabilizer/AutoLinearForce are enabled when the vehicle's velocity magnitude drops below this value. | [ 0.0 , 0.inf ) |
| minTrailSpeed | Minimum speed at which contrails turn on. | [ 0.0 , 0.inf ) |
| rollForce | Automatically applied rolling force used to 'right' a tilted vehicle. | [ 0.0 , 0.inf ) |
| rotationalDrag | Amount of drag applied to rotation about the vehicles up axis. | [ 0.0 , 0.inf ) |
| steeringForce | Strength of turning thrust. | [ 0.0 , 0.inf ) |
| steeringRollForce | How much you roll when turning. | [ 0.0 , 0.inf ) |
| trailEmitter | ParticleEmitterData datablock used for the contrail emitter(s). Emitters will be attached at nodes: contrail0 , contrail1, contrail2, and contrail3. | -- |
| verticalSurfaceForce | Wing thrust used in 'sliding' side to side during turns. | [ 0.0 , 0.inf ) |
| vertThrustMultiple | TypeF32 | [ 0.0 , 0.inf ) |
fxFoliageReplicator
This class was originally intended to represent foliage in the scene. In fact, it can be used to represent anything that is displayed using a billboard. The value of this class is that all of the objects represented by a single foliage replicator are tied to a single instance of the class. Thus, regardless of the number of objects which may be displayed by any single foliage replicator the same network bandwidth is used. The billboards may be given a variety of behaviors and attributes. They may be stretched, self lighted, they may sway, and they may be are restricted to specific areas.
Fields
| Field Name | Description | Sample or Range |
| Transform | ||
| position | XYZ position of fx object. | “10.0 20. 0.0†|
| rotation | Values have no effect. | -- |
| scale | Values have no effect. | -- |
| Debugging | ||
| useDebugInfo | Enable debug feedback. Some features must be uncommented in code to turn them on. | [ false , true ] |
| debugBoxHeight | Quad-tree box heights. | [ 0.0 , 0.inf ) |
| HideFoliage | Stop displaying foliage. | [ false , true ] |
| showPlacementArea | Show the placement feedback device. | [ false , true ] |
| placementAreaHeight | Changes height of feedback device. | [ 0.0 , 0.inf ) |
| placementColour | Changes color of feedback device. | “1.0 1.0 1.0 1.0†|
| Media/Replications | ||
| seed | Value used to deterministically generate random object positions and parameters. | [ 0 , inf ) |
| foliageFile | Texture file to use for foliage. Must be suitable for use as billboard. | ~/path/filename |
| foliageCount | Number of billboards to replicate. | [ 0 , inf ) |
| foliageRetries | Determines how many times to attempt to place a billboard. Retries are sometimes required in order to meet placement criteria. Failed placement attempts result fewer objects placed. | [ 0 , inf ) |
| Area/Placement Radius | ||
| innerRadiusX | X dimension of inner do-not-place ellipse. Objects are not allowed in ellipse described by this and the InnerRadiusY dimension. | [ 0.0 , 0.inf ) |
| innerRadiusY | Y dimension of inner do-not-place ellipse. Objects are not allowed in ellipse described by this and the InnerRadiusX dimension. | [ 0.0 , 0.inf ) |
| outerRadiusX | X dimension of outer do-not-place ellipse. Objects are not allowed outside ellipse described by this and the OuterRadiusY dimension. | [ 0.0 , 0.inf ) |
| outerRadiuxY | Y dimension of outer do-not-place ellipse. Objects are not allowed outside ellipse described by this and the OuterRadiusX dimension. | [ 0.0 , 0.inf ) |
| Dimension | ||
| minWidth | If scaling enabled (FixSizeToMax == false), this defines the billboard’s minimum width. | [ 0.0 , 0.inf ) |
| maxWidth | If scaling enabled (FixSizeToMax == false), this defines the billboard’s maximum width. | [ 0.0 , 0.inf ) |
| minHeight | If scaling enabled (FixSizeToMax == false), this defines the billboard’s minimum height. | [ 0.0 , 0.inf ) |
| maxHeight | If scaling enabled (FixSizeToMax == false), this defines the billboard’s maximum height. | [ 0.0 , 0.inf ) |
| fixAspectRatio | Prevents texture stretching. | [ false , true ] |
| fixSizeToMax | Forces all billboards to use MaxWidth and MaxHeight as their respective width and height. | [ false , true ] |
| offsetZ | This allows you to assist placement by lowering or raising the billboard by a fixed amount. | ( -0.inf , 0.inf ) |
| randomFlip | Allows random horizontal flipping of billboards, increasing variation for non-symmetric bilboards. | [ false , true ] |
| Culling | ||
| <useCulling> | Enables culling algorithms. i.e. test whether a billboard is within view before rendering it. Warning: Computing overhead offsets value for small placements. Only use for large placements if at all. | [ false , true ] |
| cullResolution | Determines size of culling quads. Lower values of CullResolution take longer to cull but more effetively removes non-visible billboards. Higher values of CullResolution take less time, but end up rendering more non-visible billboards. Tradeoff: Culling Time vs. Fill Rate. | [ 8 , inf ) |
| viewDistance | When a billboards is at distane ViewDistance from the camera, it will be completely visible. | [ 0.0 , 0.inf ) |
| viewClosest | Controls closest point at which billboards will begin to fade out. | [ 0.0 , 0.inf ) |
| fadeInRegion fadeOutRegion |
Together, these determine width of region between fade-in and fade-out. | [ 0.0 , 0.inf ) |
| alphaCutoff | Controls general alpha level for rendering billboards. | [ 0.0 , 1.0 ] |
| groundAlpha | Controls alpha in region near ground. For fixing artifacts between billboard and ground. | [ 0.0 , 1.0 ] |
| Animation | ||
| swayOn | Enables sway animation. | [ false , true ] |
| swaySync | All bilboards sway in sync for this fx Object. | [ false , true ] |
| swayMagSide | Side-to-side swaying magnitude. | [ 0.0 , 0.inf ) |
| swayMagFront | Back-and-forth swaying magnitude. | [ 0.0 , 0.inf ) |
| minSwayTime | Minimum sway time. Sway times are randomly chosen between a min and max on a per swing basis. | [ 0.0 , 0.inf ) |
| maxSwayTime | Maximum sway time. Sway times are randomly chosen between a min and max on a per swing basis. | [ 0.0 , 0.inf ) |
| Lighting | ||
| lightOn | Turns on luminance (self lighting). | [ false ,true ] |
| lightSync | Light billboards in sync. | [ false , true ] |
| minLuminance | Minimum light value. | [ 0.0 , maxLuminance ] |
| maxLuminance | Maximum light value. | [ minLuminance , 1.0 ] |
| lightTime | Time required to transition from Min to Max and Max to Min. i.e. each duration is equal to lightTime. | [ 0.0 , 0.inf ) |
| Restrictions/Restraints | ||
| allowOnTerrain | Allows objects to be placed on terrain. | [ false , true ] |
| allowOnInteriors | Allows objects to be placed on interiors. | [ false , true ] |
| allowOnStatics | Allows objects to be placed on static shapes. | [ false , true ] |
| allowOnWater | Allows objects to be placed in area covered by water. | [ false , true ] |
| allowWaterSurface | Place on surface of water. Otherwise will be placed on terrain below water. | [ false , true ] |
| allowedTerrainSlope | Maximum slope to place on. Slopes beyond this value will be devoid of objects. | [ false , true ] |
Console functions
startFoliageReplication() |
|
startFoliageReplication() |
|
Purpose |
fxLight
The fxLight object is used to represent in-game lights with and respective flares. This object casts (dynamic) light in the scene. It renders both a representation of the light source flare, and casts light on terrain and other objects.
Fields
| Field Name | Description | Sample or Range |
| enable | Boolean value enabling this light. | [ false , true ] |
| iconSize | Floating-point value specifying render size of flare. | ( -inf.0 , inf.0 ) |
Console Method Summaries
attachToObject |
detachFromObject |
reset |
Console Methods
|
attachToObject( obj ) |
|
Purpose |
|
detachFromObject() |
|
Purpose |
|
reset() |
|
Purpose |
|
setEnable( enabled ) |
|
Purpose |
Table of Contents || Part 1 || Part 2 || Part 4 || Part 5 || Part 6 || Part 7 || Part 8 || Part 9 || Part 10 || Part 11 || Part 12 || Part 13 || Part 14 || Part 15



