Torque3D Documentation / _generateds / CameraComponent

CameraComponent

Engine/source/T3D/components/camera/cameraComponent.h

More...

Protected Types

enum
_Anonymous_ {
  FOVMask = Parent::NextFreeMask
  OffsetMask = Parent::NextFreeMask << 1
  NextFreeMask = Parent::NextFreeMask << 2
}

Private Types

Parent 

Private Attributes

Default vertical FOV in degrees.

The camera vertical FOV in degrees.

Max vertical FOV allowed in degrees.

Min vertical FOV allowed in degrees.

The dimensions of the client's screen. Used to calculate the aspect ratio.

Public Functions

Returns the vertical field of view in degrees for this object if used as a camera.

getCameraParameters(F32 * min, F32 * max, Point3F * offset, MatrixF * rot)

Gets the minimum viewing distance, maximum viewing distance, camera offsetand rotation for this object, if the world were to be viewed through its eyes.

bool

Gets the camera to world space transform matrix.

Returns the default vertical field of view in degrees if this object is used as a camera.

bool

Returns true if the vertical FOV in degrees is within allowable parameters of the datablock.

bool

Called when the object is added to the sim.

Control object scoping.

Called when the object is removed from the sim.

packUpdate(NetConnection * conn, U32 mask, BitStream * stream)

Instructs this object to pack its state for transfer over the network.

Sets the vertical field of view in degrees for this object if used as a camera.

setForwardVector(VectorF newForward, VectorF upVector)

Instructs this object to read state data previously packed with packUpdate.

Public Static Functions

bool
_setCameraFov(void * object, const char * index, const char * data)
bool
_setNode(void * object, const char * index, const char * data)
bool
_setPosOffset(void * object, const char * index, const char * data)
bool
_setRotOffset(void * object, const char * index, const char * data)

Protected Functions

DECLARE_CALLBACK(F32 , validateCameraFov , (F32 fov) )

Detailed Description

Protected Types

@127

Enumerator

FOVMask = Parent::NextFreeMask
OffsetMask = Parent::NextFreeMask << 1
NextFreeMask = Parent::NextFreeMask << 2

Private Types

typedef Component Parent 

Private Attributes

F32 mCameraDefaultFov 

Default vertical FOV in degrees.

F32 mCameraFov 

The camera vertical FOV in degrees.

F32 mCameraMaxFov 

Max vertical FOV allowed in degrees.

F32 mCameraMinFov 

Min vertical FOV allowed in degrees.

Point2F mClientScreen 

The dimensions of the client's screen. Used to calculate the aspect ratio.

Protected Attributes

Point3F mPosOffset 
RotationF mRotOffset 
StringTableEntry mTargetNode 
S32 mTargetNodeIdx 
bool mUseParentTransform 

Public Functions

CameraComponent()

~CameraComponent()

DECLARE_CONOBJECT(CameraComponent )

getCameraFov()

Reimplemented from: CameraInterface

getCameraParameters(F32 * min, F32 * max, Point3F * offset, MatrixF * rot)

Gets the minimum viewing distance, maximum viewing distance, camera offsetand rotation for this object, if the world were to be viewed through its eyes.

Parameters:

min

Minimum viewing distance

max

Maximum viewing distance

offset

Offset of the camera from the origin in local space

rot

Rotation matrix

getCameraTransform(F32 * pos, MatrixF * mat)

Reimplemented from: CameraInterface

getDefaultCameraFov()

Returns the default vertical field of view in degrees if this object is used as a camera.

getFrustum()

Reimplemented from: CameraInterface

getPosOffset()

getRotOffset()

isValidCameraFov(F32 fov)

Reimplemented from: CameraInterface

onAdd()

Reimplemented from: Component

onCameraScopeQuery(NetConnection * cr, CameraScopeQuery * camInfo)

Reimplemented from: CameraInterface

onRemove()

Reimplemented from: Component

packUpdate(NetConnection * conn, U32 mask, BitStream * stream)

Reimplemented from: Component

setCameraFov(F32 fov)

Reimplemented from: CameraInterface

setForwardVector(VectorF newForward, VectorF upVector)

setPosition(Point3F newPos)

setRotation(RotationF newRot)

setRotOffset(RotationF rot)

unpackUpdate(NetConnection * conn, BitStream * stream)

Reimplemented from: Component

Public Static Functions

_setCameraFov(void * object, const char * index, const char * data)

_setNode(void * object, const char * index, const char * data)

_setPosOffset(void * object, const char * index, const char * data)

_setRotOffset(void * object, const char * index, const char * data)

initPersistFields()

Protected Functions

DECLARE_CALLBACK(F32 , validateCameraFov , (F32 fov) )