C# Класс world3D.Object3D

Represents a visible three dimensional object, such as a box, sphere, vehicle, NPC, ... Abstracts from the representation (like voxels) and encapsulates common operations on 3D objects like transformations.
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
frame int

Защищенные свойства (Protected)

Свойство Тип Описание
_representation BFSOctree

Открытые методы

Метод Описание
Object3D ( BFSOctree representation, bool rightHandedCoordinateSystem )

Creates a new 3D object consiting of the provided octree. After creation, its transformation matrices reflect its position and orientation in the world space coordinate system.

getData ( ) : BFSOctree

Returns the raw 3d data that represents this object.

getRotation ( ) : Matrix

Returns the rotation matrix of this model only. Suitable for transforming normals.

getTransformation ( ) : Matrix

Returns the transformations of this object. Rotation is always applied before translation.

rotate ( Vector3 axis, float angle ) : void

Rotates the object around axis by angle.

translate ( Vector3 offset ) : void

Translates this object by offset.

Приватные методы

Метод Описание
updateTransformation ( ) : void

Caches the transformations of this model after each modification of its position / orientation.

Описание методов

Object3D() публичный Метод

Creates a new 3D object consiting of the provided octree. After creation, its transformation matrices reflect its position and orientation in the world space coordinate system.
public Object3D ( BFSOctree representation, bool rightHandedCoordinateSystem )
representation BFSOctree The raw 3d data which represents the object in form of a BFSOctree.
rightHandedCoordinateSystem bool Indicates whether the calling /// framework uses a right-handed coordinate system and if therefore the /// object needs to be translated into this system, if false nothing happens as /// octree data is always provided in a left-handed manner.

getData() публичный Метод

Returns the raw 3d data that represents this object.
public getData ( ) : BFSOctree
Результат BFSOctree

getRotation() публичный Метод

Returns the rotation matrix of this model only. Suitable for transforming normals.
public getRotation ( ) : Matrix
Результат Matrix

getTransformation() публичный Метод

Returns the transformations of this object. Rotation is always applied before translation.
public getTransformation ( ) : Matrix
Результат Matrix

rotate() публичный Метод

Rotates the object around axis by angle.
public rotate ( Vector3 axis, float angle ) : void
axis Vector3 The axis to rotate this object around.
angle float The angle to rotate this object by.
Результат void

translate() публичный Метод

Translates this object by offset.
public translate ( Vector3 offset ) : void
offset Vector3 The offset to translate this object by.
Результат void

Описание свойств

_representation защищенное свойство

protected BFSOctree _representation
Результат BFSOctree

frame публичное свойство

public int frame
Результат int