Class GCurve
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.GCurve
- All Implemented Interfaces:
EventEmitterInterface, EventListener, IdempotentEventListener<GPointMovedEvent, SamePair<Double>>, CanCopy, DecomposeWhenDrawn<Segment>, SceneObject, HasProperties
public final class GCurve
extends GObject
implements IdempotentEventListener<GPointMovedEvent, SamePair<Double>>, DecomposeWhenDrawn<Segment>
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intprivate GPointprivate booleanprivate GPoint(package private) double(package private) double(package private) double(package private) ArrayList<RenderState<Segment, GObject>> private GPointFields inherited from class GObject
col, pivotProperty, propertiesFields inherited from class EventEmitter
registered -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddProps()voidcopy(CopyProperties props) Copies the properties of this object based on the providedCopyProperties.private GCurvevoidThe actual decomposition.explode()static GCurveintFetches the actual decomposition list.Returns the duplicate object that events of typeTwill calculate/generate.getEnd()getStart()voidhandlePossibleDuplicates(EventType type, GPointMovedEvent payload) The handler to pass through for this specific type.voidonEvent(EventType event, EventPayload properties) onEvent is called byEventEmitterviaEventEmitter.broadcast(EventType, EventPayload).point(double t) voidsetAmount(int amount) toObject()Converts this SceneObject to aEngineObjectbeing a Jaiva-readableArrayListof data.Methods inherited from class GObject
asReference, deleteSelf, equals, getColour, getId, getName, getPivot, getProperties, getTags, hashCode, isDeletedState, setColour, setId, setPivotMethods inherited from class EventEmitter
attachListener, broadcast, detachAll, detachListener, genericAttach, genericBroadcast, genericDetach, genericDetachAll, isAttachedMethods inherited from class Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface DecomposeWhenDrawn
invalidateAllMethods inherited from interface SceneObject
tag
-
Field Details
-
start
-
controlPoint
-
end
-
amount
private int amount -
deletedState
private boolean deletedState -
segments
ArrayList<RenderState<Segment,GObject>> segments -
lengthA
double lengthA -
lengthB
double lengthB -
EPSILON
double EPSILON
-
-
Constructor Details
-
GCurve
-
-
Method Details
-
fromRaw
-
addProps
public void addProps() -
getAmount
public int getAmount() -
setAmount
public void setAmount(int amount) -
point
-
getPointStream
-
getStart
-
getEnd
-
getControlPoint
-
explode
-
decompose
public void decompose()Description copied from interface:DecomposeWhenDrawnThe actual decomposition.- Specified by:
decomposein interfaceDecomposeWhenDrawn<Segment>
-
getDecomposeList
Description copied from interface:DecomposeWhenDrawnFetches the actual decomposition list.- Specified by:
getDecomposeListin interfaceDecomposeWhenDrawn<Segment>- Returns:
- The arraylist of decomposed stuff
-
genericRenderStateList
- Overrides:
genericRenderStateListin classGObject
-
onEvent
Description copied from interface:EventListeneronEvent is called byEventEmitterviaEventEmitter.broadcast(EventType, EventPayload). Allowing the emitter to call any other object that implements this.- Specified by:
onEventin interfaceEventListener- Overrides:
onEventin classGObject- Parameters:
event- The type of eventproperties- The given event payload
-
getDupeObjectToCheck
Description copied from interface:IdempotentEventListenerReturns the duplicate object that events of typeTwill calculate/generate.- Specified by:
getDupeObjectToCheckin interfaceIdempotentEventListener<GPointMovedEvent, SamePair<Double>>- Returns:
- The duplicate object to check against.
-
handlePossibleDuplicates
Description copied from interface:IdempotentEventListenerThe handler to pass through for this specific type.- Specified by:
handlePossibleDuplicatesin interfaceIdempotentEventListener<GPointMovedEvent, SamePair<Double>>- Parameters:
type- The type of event.payload- The payload given.
-
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.
-
copy
-
getEngineObjectType
- Specified by:
getEngineObjectTypein classGObject
-
toObject
Description copied from interface:SceneObjectConverts this SceneObject to aEngineObjectbeing a Jaiva-readableArrayListof data.- Specified by:
toObjectin interfaceSceneObject- Overrides:
toObjectin classGObject- Returns:
- An
EngineObject
-