C# Class THREE.Object3D

Exibir arquivo Open project: guidovanhilst/SharpThreejs Class Usage Examples

Public Properties

Property Type Description
castShadow bool
children THREE.Object3D[]
frustumCulled bool
id string
matrix Matrix4
matrixAutoUpdate bool
matrixWorld Matrix4
matrixWorldNeedsUpdate bool
name string
parent Object3D
position Vector3
quaternion THREE.Quaternion
receiveShadow bool
rotation Euler
rotationAutoUpdate bool
scale Vector3
up Vector3
userData object
uuid string
visible bool

Public Methods

Method Description
Object3D ( ) : System

The constructor takes no arguments.

add ( IEnumerable obj ) : void

Adds object as child of this object. An arbitrary number of objects may be added.

add ( Object3D obj ) : void

Adds object as child of this object. An arbitrary number of objects may be added.

applyMatrix ( Matrix4 m ) : void

matrix - matrix This updates the position, rotation and scale with the matrix.

getChildByName ( string name ) : Object3D

Searches through the object's children and returns the first with a matching name.

getObjectByProperty ( string name, object value ) : object
localToWorld ( Vector3 v ) : Vector3

Updates the vector from local space to world space.

lookAt ( Vector3 point ) : void

Rotates object to face point in space.

raycast ( THREE r, object intersects ) : void

Abstract method to get intersections between a casted ray and this object. Subclasses such as Mesh, Line, and Points implement this method in order to participate in raycasting.

remove ( IEnumerable obj ) : void

Removes object as child of this object. An arbitrary number of objects may be removed.

remove ( Object3D obj ) : void

Removes object as child of this object. An arbitrary number of objects may be removed.

translateX ( double distance ) : void

ranslates object along x axis by distance.

translateY ( double distance ) : void

ranslates object along y axis by distance.

translateZ ( double distance ) : void

ranslates object along z axis by distance.

updateMatrix ( ) : void

Updates local transform.

updateMatrixWorld ( bool force ) : void

Updates global transform of the object and its children.

updateProjectionMatrix ( ) : void
worldToLocal ( Vector3 v ) : Vector3

pdates the vector from world space to local space.

Method Details

Object3D() public method

The constructor takes no arguments.
public Object3D ( ) : System
return System

add() public method

Adds object as child of this object. An arbitrary number of objects may be added.
public add ( IEnumerable obj ) : void
obj IEnumerable
return void

add() public method

Adds object as child of this object. An arbitrary number of objects may be added.
public add ( Object3D obj ) : void
obj Object3D
return void

applyMatrix() public method

matrix - matrix This updates the position, rotation and scale with the matrix.
public applyMatrix ( Matrix4 m ) : void
m Matrix4
return void

getChildByName() public method

Searches through the object's children and returns the first with a matching name.
public getChildByName ( string name ) : Object3D
name string
return Object3D

getObjectByProperty() public method

public getObjectByProperty ( string name, object value ) : object
name string
value object
return object

localToWorld() public method

Updates the vector from local space to world space.
public localToWorld ( Vector3 v ) : Vector3
v Vector3
return Vector3

lookAt() public method

Rotates object to face point in space.
public lookAt ( Vector3 point ) : void
point Vector3
return void

raycast() public method

Abstract method to get intersections between a casted ray and this object. Subclasses such as Mesh, Line, and Points implement this method in order to participate in raycasting.
public raycast ( THREE r, object intersects ) : void
r THREE
intersects object
return void

remove() public method

Removes object as child of this object. An arbitrary number of objects may be removed.
public remove ( IEnumerable obj ) : void
obj IEnumerable
return void

remove() public method

Removes object as child of this object. An arbitrary number of objects may be removed.
public remove ( Object3D obj ) : void
obj Object3D
return void

translateX() public method

ranslates object along x axis by distance.
public translateX ( double distance ) : void
distance double
return void

translateY() public method

ranslates object along y axis by distance.
public translateY ( double distance ) : void
distance double
return void

translateZ() public method

ranslates object along z axis by distance.
public translateZ ( double distance ) : void
distance double
return void

updateMatrix() public method

Updates local transform.
public updateMatrix ( ) : void
return void

updateMatrixWorld() public method

Updates global transform of the object and its children.
public updateMatrixWorld ( bool force ) : void
force bool
return void

updateProjectionMatrix() public method

public updateProjectionMatrix ( ) : void
return void

worldToLocal() public method

pdates the vector from world space to local space.
public worldToLocal ( Vector3 v ) : Vector3
v Vector3
return Vector3

Property Details

castShadow public_oe property

Gets rendered into shadow map. default – false
public bool castShadow
return bool

children public_oe property

Array with object's children.
public Object3D[],THREE children
return THREE.Object3D[]

frustumCulled public_oe property

When this is set, it checks every frame if the object is in the frustum of the camera. Otherwise the object gets drawn every frame even if it isn't visible. default – true
public bool frustumCulled
return bool

id public_oe property

readonly – Unique number for this object instance.
public string id
return string

matrix public_oe property

Local transform.
public Matrix4,THREE matrix
return Matrix4

matrixAutoUpdate public_oe property

When this is set, it calculates the matrix of position, (rotation or quaternion) and scale every frame and also recalculates the matrixWorld property. default – true
public bool matrixAutoUpdate
return bool

matrixWorld public_oe property

The global transform of the object. If the Object3d has no parent, then it's identical to the local transform.
public Matrix4,THREE matrixWorld
return Matrix4

matrixWorldNeedsUpdate public_oe property

When this is set, it calculates the matrixWorld in that frame and resets this property to false. default – false
public bool matrixWorldNeedsUpdate
return bool

name public_oe property

Optional name of the object (doesn't need to be unique).
public string name
return string

parent public_oe property

Object's parent in the scene graph.
public Object3D,THREE parent
return Object3D

position public_oe property

Object's local position.
public Vector3 position
return Vector3

quaternion public_oe property

Object's local rotation as Quaternion.
public Quaternion,THREE quaternion
return THREE.Quaternion

receiveShadow public_oe property

Material gets baked in shadow receiving. default – false
public bool receiveShadow
return bool

rotation public_oe property

Object's local rotation (Euler angles), in radians.
public Euler,THREE rotation
return Euler

rotationAutoUpdate public_oe property

When this is set, then the rotationMatrix gets calculated every frame. default – true
public bool rotationAutoUpdate
return bool

scale public_oe property

Object's local scale.
public Vector3 scale
return Vector3

up public_oe property

Up direction. Default is THREE.Vector3( 0, 1, 0 ).
public Vector3 up
return Vector3

userData public_oe property

An object that can be used to store custom data about the Object3d. It should not hold references to functions as these will not be cloned.
public object userData
return object

uuid public_oe property

UUID of this object instance. This gets automatically assigned, so this shouldn't be edited.
public string uuid
return string

visible public_oe property

Object gets rendered if true. default – true
public bool visible
return bool