Component constructor
Type-name of the component, e.g. name of sub-class implementing the component. "MyComponent", etc.
camera looking direction. Updated when navigating the camers.
Camera target. Define centre of camera rotation.
Distance from camera target to camera.
Navigation is only active when this flag is set.
Current camera angle in horizontal direction [-TwoPI,+TwoPI] (glm::roll(transformComponent->rotation))
Internal flag set if component is a Cogs Core component.
Maximal distance from camera position to camera target (zoom).
Maximal field of view.
Maximum camera angle in vertical direction [-PI,+PI].
Minimal distance from camera position to camera target (zoom).
Minimal field of view.
Minimum camera angle in vertical direction [-PI,+PI].
Set to false to disable controller moving the camera and only apply rotate and zoom. Useful for viewing 360 images.
Deprecated Seeking flag - not used.
Current camera angle in vertical direction [-PI,+PI] (glm::pitch(transformComponent->rotation))
Gets the optional owning entity
Component name == type. For compatibility
Gets the type of the component. Ex. "TransformComponent", "SceneComponent" etc.
Static
createInternal: Creates a new component of the given type (name). Component is wrapped when adding to an entity.
Type of the component. Ex. "TransformComponent"
Created Cogs.js component.
Static
wrap
Component that calculates position and orientation of the entity TransformComponent. Normally added to a Camera entity to handle camera rotate and zoom. Will handle input events moving the (camera) transformation based on the input events (mouse & touch). When using this controller, avoid changing TransformComponent fields as changed values will be replaced next time this component is modified. Insted calculate new rotations, distance and target field values of this component.