Class GPoint
java.lang.Object
com.j3d.engine.react.events.EventEmitter
com.j3d.engine.react.events.EventEmitterAndListener
com.j3d.engine.scene.nodes.geometry.GObject
com.j3d.engine.scene.nodes.geometry.GPoint
- All Implemented Interfaces:
EventEmitterInterface, EventListener, CanCopy, DecomposeWhenDrawn<Point>, HasParents<GObject>, SceneObject, HasProperties
GPoint is a class that represents a single point in 3D space.
Unlike other GObjects who's pivot has to be calculated to be
it's geometric centre, a GPoint's pivot is just its position.
a Thing stores GPoints separately as they form the core
of any transformation irrespective of whether it's part of some
other geometry. This means all transformations need to be point based
and applied to the GPoint.
A GPoint is also stored within SceneManager.points for redundancy.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class GObject
GObject.EngineObjectUtils -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe diameter of the point when drawn on screen.private RenderState<Point, GObject> Fields inherited from class GObject
col, pivotProperty, propertiesFields inherited from class EventEmitter
registered -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a parent to this object's set of parents.private voidaddProps()voidcopy(CopyProperties props) Copies the properties of this object based on the providedCopyProperties.protected GPointcopySelf()voidThe actual decomposition.booleanDeletes itselfbooleanvoidstatic GPointConstructs a GPoint.Fetches the actual decomposition list.Retrieves the set of all parent objects that this object belongs to.inthashCode()voidremoveParent(GObject parent) Removes a parent from this object's set of parents.voidSets the pivot point.voidsetPivotNoEvent(Vector3 pivot) toPoint()toString()Methods inherited from class GObject
asReference, getColour, getId, getName, getPivot, getProperties, getTags, isDeletedState, onEvent, setColour, setId, toObjectMethods inherited from class EventEmitter
attachListener, broadcast, detachAll, detachListener, genericAttach, genericBroadcast, genericDetach, genericDetachAll, isAttachedMethods inherited from interface DecomposeWhenDrawn
invalidateAllMethods inherited from interface HasParents
addParents, clearParents, hasParentMethods inherited from interface SceneObject
tag
-
Field Details
-
DIAMETER
public static final int DIAMETERThe diameter of the point when drawn on screen.This should be used as the standard diameter for all points.
- See Also:
-
parents
-
renderState
-
-
Constructor Details
-
GPoint
-
-
Method Details
-
fromRaw
-
setPivot
-
setPivotNoEvent
-
toPoint
-
addProps
private void addProps() -
deleteSelf
public boolean deleteSelf()Description copied from class:GObjectDeletes itself- Overrides:
deleteSelfin classGObject- Returns:
- true if the object was deleted
-
equals
-
toString
-
getParents
Description copied from interface:HasParentsRetrieves the set of all parent objects that this object belongs to.- Specified by:
getParentsin interfaceHasParents<GObject>- Returns:
- A
HashSetcontaining all parent objects. Using a Set ensures that a parent can only be added once.
-
addParent
Description copied from interface:HasParentsAdds a parent to this object's set of parents.- Specified by:
addParentin interfaceHasParents<GObject>- Parameters:
parent- The parent object to add.
-
removeParent
Description copied from interface:HasParentsRemoves a parent from this object's set of parents.- Specified by:
removeParentin interfaceHasParents<GObject>- Parameters:
parent- The parent object to remove.
-
copy
Description copied from interface:CanCopyCopies the properties of this object based on the providedCopyProperties. The implementation should handle how the copying is performed, potentially creating a new instance or modifying an existing one.- Specified by:
copyin interfaceCanCopy- Overrides:
copyin classGObject- Parameters:
props- The properties defining how the copy operation should be performed.- Throws:
InvalidCopyException- If the copy operation cannot be completed due to invalid properties or state.
-
copySelf
-
explode
-
hashCode
-
decompose
public void decompose()Description copied from interface:DecomposeWhenDrawnThe actual decomposition.- Specified by:
decomposein interfaceDecomposeWhenDrawn<Point>
-
getDecomposeList
Description copied from interface:DecomposeWhenDrawnFetches the actual decomposition list.- Specified by:
getDecomposeListin interfaceDecomposeWhenDrawn<Point>- Returns:
- The arraylist of decomposed stuff
-
genericRenderStateList
- Overrides:
genericRenderStateListin classGObject
-
getEngineObjectType
- Specified by:
getEngineObjectTypein classGObject
-