Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

ParametricCurveCollection Class Reference

This is a set of zero or more ParametricCurves, which may or may not be related. More...

#include <parametricCurveCollection.h>

Inheritance diagram for ParametricCurveCollection:

ReferenceCount List of all members.

Public Member Functions

 ParametricCurveCollection ()
 ~ParametricCurveCollection ()
void add_curve (ParametricCurve *curve)
 Adds a new ParametricCurve to the collection.

void add_curve (ParametricCurve *curve, int index)
 Adds a new ParametricCurve to the collection at the indicated index.

int add_curves (PandaNode *node)
 Adds all the curves found in the scene graph rooted at the given node.

bool remove_curve (ParametricCurve *curve)
 Removes the indicated ParametricCurve from the collection.

void remove_curve (int index)
 Removes the indicated ParametricCurve from the collection, by its index number.

bool has_curve (ParametricCurve *curve) const
 Returns true if the indicated ParametricCurve appears in this collection, false otherwise.

void clear ()
 Removes all ParametricCurves from the collection.

void clear_timewarps ()
 Removes all the timewarp curves from the collection.

int get_num_curves () const
 Returns the number of ParametricCurves in the collection.

ParametricCurveget_curve (int index) const
 Returns the nth ParametricCurve in the collection.

ParametricCurveget_xyz_curve () const
 Returns the first XYZ curve in the collection, if any, or NULL if there are none.

ParametricCurveget_hpr_curve () const
 Returns the first HPR curve in the collection, if any, or NULL if there are none.

ParametricCurveget_default_curve () const
 If there is an XYZ curve in the collection, returns it; otherwise, returns the first curve whose type is unspecified.

int get_num_timewarps () const
 Returns the number of timewarp curves in the collection.

ParametricCurveget_timewarp_curve (int n) const
 Returns the nth timewarp curve in the collection.

float get_max_t () const
 Returns the maximum T value associated with the last* curve in the collection.

void make_even (float max_t, float segments_per_unit)
 Discards all existing timewarp curves and recomputes a new timewarp curve that maps distance along the curve to parametric time, so that the distance between any two points in parametric time is proportional to the approximate distance of those same two points along the XYZ curve.

void face_forward (float segments_per_unit)
 Discards the existing HPR curve and generates a new one that looks in the direction of travel along the XYZ curve, based on the XYZ curve's tangent at each point.

void reset_max_t (float max_t)
 Adjusts the apparent length of the curve by applying a new timewarp that maps the range [0..max_t] to the range [0..get_max_t()].

bool evaluate (float t, LVecBase3f &xyz, LVecBase3f &hpr) const
 Computes the position and rotation represented by the first XYZ and HPR curves in the collection at the given point t, after t has been modified by all the timewarp curves in the collection applied in sequence, from back to front.

bool evaluate (float t, LMatrix4f &result, CoordinateSystem cs=CS_default) const
 Computes the transform matrix representing translation to the position indicated by the first XYZ curve in the collection and the rotation indicated by the first HPR curve in the collection, after t has been modified by all the timewarp curves in the collection applied in sequence, from back to front.

float evaluate_t (float t) const
 Determines the value of t that should be passed to the XYZ and HPR curves, after applying the given value of t to all the timewarps.

bool evaluate_xyz (float t, LVecBase3f &xyz) const
 Computes only the XYZ part of the curves.

bool evaluate_hpr (float t, LVecBase3f &hpr) const
 Computes only the HPR part of the curves.

bool adjust_xyz (float t, float x, float y, float z)
 Adjust the XYZ curve at the indicated time to the new value.

bool adjust_xyz (float t, const LVecBase3f &xyz)
 Adjust the XYZ curve at the indicated time to the new value.

bool adjust_hpr (float t, float h, float p, float r)
 Adjust the HPR curve at the indicated time to the new value.

bool adjust_hpr (float t, const LVecBase3f &xyz)
 Adjust the HPR curve at the indicated time to the new value.

bool recompute ()
 Ensures all the curves are freshly computed and up-to-date.

bool stitch (const ParametricCurveCollection *a, const ParametricCurveCollection *b)
 Regenerates this curve as one long curve: the first curve connected end-to-end with the second one.

void output (ostream &out) const
 Writes a brief one-line description of the ParametricCurveCollection to the indicated output stream.

void write (ostream &out, int indent_level=0) const
 Writes a complete multi-line description of the ParametricCurveCollection to the indicated output stream.

bool write_egg (Filename filename, CoordinateSystem cs=CS_default)
 Writes an egg description of all the nurbs curves in the collection to the specified output file.

bool write_egg (ostream &out, const Filename &filename, CoordinateSystem cs)
 Writes an egg description of all the nurbs curves in the collection to the specified output stream.

int r_add_curves (PandaNode *node)
 The recursive implementation of add_curves().

void register_drawer (ParametricCurveDrawer *drawer)
 Registers a Drawer with this curve collection that will automatically be updated whenever the collection is modified, so that the visible representation of the curve is kept up to date.

void unregister_drawer (ParametricCurveDrawer *drawer)
 Removes a previously registered drawer from the list of automatically-refreshed drawers.

int get_ref_count () const
 Returns the current reference count.

int ref () const
 Explicitly increments the reference count.

int unref () const
 Explicitly decrements the reference count.

void test_ref_count_integrity () const
 Does some easy checks to make sure that the reference count isn't completely bogus.


Static Public Member Functions

TypeHandle get_class_type ()
void init_type ()

Private Types

typedef pvector< PointerTo<
ParametricCurve > > 
ParametricCurves
typedef plist< ParametricCurveDrawer * > DrawerList

Private Member Functions

bool determine_hpr (float t, ParametricCurve *xyz_curve, LVecBase3f &hpr) const
 Computes the orientation at the given point in time, based on the tangent of the XYZ curve.

void prepare_add_curve (ParametricCurve *curve)
 Registers the curve with the list of drawers that share this collection, in preparation for adding it to the _curves list.

void prepare_remove_curve (ParametricCurve *curve)
 Unregisters the curve with the list of drawers that share this collection, in preparation for removing it from the _curves list.

void redraw ()
 Calls redraw() on all drawers that share this collection.


Private Attributes

ParametricCurves _curves
DrawerList _drawers

Detailed Description

This is a set of zero or more ParametricCurves, which may or may not be related.

If they are related, the set should contain no more than one XYZ curve, no more than one HPR curve, and zero or more Timewarp curves, which can then be evaluated as a unit to return a single transformation matrix for a given unit of time.

Definition at line 57 of file parametricCurveCollection.h.


Member Typedef Documentation

typedef plist<ParametricCurveDrawer *> ParametricCurveCollection::DrawerList [private]
 

Definition at line 123 of file parametricCurveCollection.h.

typedef pvector< PointerTo< ParametricCurve > > ParametricCurveCollection::ParametricCurves [private]
 

Definition at line 121 of file parametricCurveCollection.h.


Constructor & Destructor Documentation

ParametricCurveCollection::ParametricCurveCollection  ) 
 

Definition at line 41 of file parametricCurveCollection.cxx.

References _curves, prepare_add_curve(), and redraw().

ParametricCurveCollection::~ParametricCurveCollection  )  [inline]
 

Definition at line 31 of file parametricCurveCollection.I.

References _curves, and INLINE.


Member Function Documentation

void ParametricCurveCollection::add_curve ParametricCurve curve,
int  index
 

Adds a new ParametricCurve to the collection at the indicated index.

Definition at line 70 of file parametricCurveCollection.cxx.

References r_add_curves(), and redraw().

void ParametricCurveCollection::add_curve ParametricCurve curve  ) 
 

Adds a new ParametricCurve to the collection.

Definition at line 53 of file parametricCurveCollection.cxx.

References _curves, prepare_add_curve(), and redraw().

Referenced by evaluate().

int ParametricCurveCollection::add_curves PandaNode node  ) 
 

Adds all the curves found in the scene graph rooted at the given node.

Returns the number of curves found.

Definition at line 90 of file parametricCurveCollection.cxx.

References _curves, and remove_curve().

bool ParametricCurveCollection::adjust_hpr float  t,
const LVecBase3f &  xyz
 

Adjust the HPR curve at the indicated time to the new value.

The curve shape will change correspondingly. Returns true if successful, false if unable to make the adjustment for some reason.

Definition at line 763 of file parametricCurveCollection.cxx.

References cs, CS_default, CS_invalid, CS_yup_right, CS_zup_left, CS_zup_right, and default_coordinate_system.

bool ParametricCurveCollection::adjust_hpr float  t,
float  h,
float  p,
float  r
[inline]
 

Adjust the HPR curve at the indicated time to the new value.

The curve shape will change correspondingly. Returns true if successful, false if unable to make the adjustment for some reason.

Definition at line 148 of file parametricCurveCollection.I.

Referenced by evaluate_hpr().

bool ParametricCurveCollection::adjust_xyz float  t,
const LVecBase3f &  xyz
 

Adjust the XYZ curve at the indicated time to the new value.

The curve shape will change correspondingly. Returns true if successful, false if unable to make the adjustment for some reason.

Definition at line 735 of file parametricCurveCollection.cxx.

References _curves.

bool ParametricCurveCollection::adjust_xyz float  t,
float  x,
float  y,
float  z
[inline]
 

Adjust the XYZ curve at the indicated time to the new value.

The curve shape will change correspondingly. Returns true if successful, false if unable to make the adjustment for some reason.

Definition at line 129 of file parametricCurveCollection.I.

Referenced by evaluate_xyz().

void ParametricCurveCollection::clear  ) 
 

Removes all ParametricCurves from the collection.

Definition at line 180 of file parametricCurveCollection.cxx.

References NULL, and PCT_HPR.

Referenced by evaluate().

void ParametricCurveCollection::clear_timewarps  ) 
 

Removes all the timewarp curves from the collection.

Definition at line 200 of file parametricCurveCollection.cxx.

bool ParametricCurveCollection::determine_hpr float  t,
ParametricCurve xyz_curve,
LVecBase3f &  hpr
const [private]
 

Computes the orientation at the given point in time, based on the tangent of the XYZ curve.

Returns true if the orientation can be determined, or false if it cannot (in which case hpr is left unchanged).

Definition at line 1107 of file parametricCurveCollection.cxx.

bool ParametricCurveCollection::evaluate float  t,
LMatrix4f &  result,
CoordinateSystem  cs = CS_default
const
 

Computes the transform matrix representing translation to the position indicated by the first XYZ curve in the collection and the rotation indicated by the first HPR curve in the collection, after t has been modified by all the timewarp curves in the collection applied in sequence, from back to front.

Returns true if the point is valid (i.e. t is within the bounds indicated by all the timewarp curves and within the bounds of the curves themselves), or false otherwise.

Definition at line 674 of file parametricCurveCollection.cxx.

References add_curve(), clear(), get_hpr_curve(), get_xyz_curve(), NULL, NurbsCurve, PCT_XYZ, PT, and ParametricCurve::set_curve_type().

bool ParametricCurveCollection::evaluate float  t,
LVecBase3f &  xyz,
LVecBase3f &  hpr
const
 

Computes the position and rotation represented by the first XYZ and HPR curves in the collection at the given point t, after t has been modified by all the timewarp curves in the collection applied in sequence, from back to front.

Returns true if the point is valid (i.e. t is within the bounds indicated by all the timewarp curves and within the bounds of the curves themselves), or false otherwise.

Definition at line 588 of file parametricCurveCollection.cxx.

References _curves, and PCT_T.

Referenced by CurveFitter::get_sample_tangent(), and reset_max_t().

bool ParametricCurveCollection::evaluate_hpr float  t,
LVecBase3f &  hpr
const [inline]
 

Computes only the HPR part of the curves.

See evaluate().

Definition at line 109 of file parametricCurveCollection.I.

References adjust_hpr(), INLINE, and t.

float ParametricCurveCollection::evaluate_t float  t  )  const
 

Determines the value of t that should be passed to the XYZ and HPR curves, after applying the given value of t to all the timewarps.

Return -1.0f if the value of t exceeds one of the timewarps' ranges.

Definition at line 701 of file parametricCurveCollection.cxx.

bool ParametricCurveCollection::evaluate_xyz float  t,
LVecBase3f &  xyz
const [inline]
 

Computes only the XYZ part of the curves.

See evaluate().

Definition at line 93 of file parametricCurveCollection.I.

References adjust_xyz(), INLINE, t, x, and y.

void ParametricCurveCollection::face_forward float  segments_per_unit  ) 
 

Discards the existing HPR curve and generates a new one that looks in the direction of travel along the XYZ curve, based on the XYZ curve's tangent at each point.

Definition at line 473 of file parametricCurveCollection.cxx.

TypeHandle ReferenceCount::get_class_type void   )  [inline, static, inherited]
 

Reimplemented in AnimBundle, AnimBundleNode, AnimChannel< SwitchType >, AnimChannelBase, AnimChannelFixed< SwitchType >, AnimChannelMatrixXfmTable, AnimChannelScalarTable, AnimControl, AnimGroup, MovingPart< SwitchType >, MovingPartBase, MovingPartMatrix, MovingPartScalar, PartBundle, PartBundleNode, PartGroup, Character, CharacterJoint, CharacterJointBundle, CharacterSlider, ComputedVertices, CollisionEntry, CollisionHandler, CollisionHandlerEvent, CollisionHandlerFloor, CollisionHandlerPhysical, CollisionHandlerPusher, CollisionHandlerQueue, CollisionNode, CollisionPlane, CollisionPolygon, CollisionRay, CollisionSegment, CollisionSolid, CollisionSphere, CRGraphicsStateGuardian, CRSavedFrameBuffer, AnalogNode, ButtonNode, ClientAnalogDevice, ClientBase, ClientButtonDevice, ClientDevice, ClientDialDevice, ClientTrackerDevice, DialNode, MouseAndKeyboard, TrackerNode, VirtualMouse, DataNode, GraphicsChannel, GraphicsLayer, GraphicsPipe, GraphicsStateGuardian, GraphicsWindow, HardwareChannel, SavedFrameBuffer, CylindricalLens, FisheyeLens, ProjectionScreen, PSphereLens, DXGraphicsStateGuardian7, DXSavedFrameBuffer7, wdxGraphicsPipe7, wdxGraphicsWindow7, DXGraphicsStateGuardian8, DXSavedFrameBuffer8, wdxGraphicsPipe8, wdxGraphicsWindow8, EggAnimData, EggBin, EggBinMaker, EggComment, EggCoordinateSystem, EggCurve, EggData, EggExternalReference, EggFilenameNode, EggGroup, EggGroupNode, EggGroupUniquifier, EggMaterial, EggNamedObject, EggNameUniquifier, EggNode, EggNurbsCurve, EggNurbsSurface, EggObject, EggPoint, EggPolygon, EggPoolUniquifier, EggPrimitive, EggSAnimData, EggSurface, EggSwitchCondition, EggSwitchConditionDistance, EggTable, EggTexture, EggVertex, EggVertexPool, EggXfmAnimData, EggXfmSAnim, Event, EventStoreValueBase, EventStoreValue< Type >, RefCountProxy< Base >, RefCountObj< Base >, ThatThingie, ThisThingie, WhatAThingie, Thread, TypedReferenceCount, VirtualFile, VirtualFileComposite, VirtualFileSimple, WindowFramework, GLGraphicsStateGuardian, GLSavedFrameBuffer, glxGraphicsPipe, glxGraphicsStateGuardian, glxGraphicsWindow, dDrawable, Geom, GeomLine, GeomLinestrip, GeomPoint, GeomPolygon, GeomQuad, GeomSphere, GeomSprite, GeomTri, GeomTrifan, GeomTristrip, ImageBuffer, Lens, Material, MatrixLens, OrthographicLens, PerspectiveLens, PixelBuffer, Texture, GraphicsStateGuardianBase, Lerp, AutonomousLerp, LerpBlendType, EaseInBlendType, EaseOutBlendType, EaseInOutBlendType, NoBlendType, LerpFunctor, SimpleLerpFunctor< value >, SimpleQueryLerpFunctor< value >, MultiLerpFunctor, BoundingHexahedron, BoundingLine, BoundingSphere, BoundingVolume, FiniteBoundingVolume, GeometricBoundingVolume, OmniBoundingVolume, ClassicNurbsCurve, CubicCurveseg, HermiteCurve, NurbsPPCurve, ParametricCurve, PiecewiseCurve, RopeNode, AlphaTestAttrib, AmbientLight, BillboardEffect, Camera, ClipPlaneAttrib, ColorAttrib, ColorBlendAttrib, ColorScaleAttrib, ColorWriteAttrib, CompassEffect, CullBin, CullBinAttrib, CullBinBackToFront, CullBinFixed, CullBinFrontToBack, CullBinUnsorted, CullFaceAttrib, DecalEffect, DepthOffsetAttrib, DepthTestAttrib, DepthWriteAttrib, DirectionalLight, Fog, FogAttrib, GeomNode, LensNode, Light, LightAttrib, LightLensNode, LightNode, LODNode, MaterialAttrib, ModelNode, ModelRoot, NodePathComponent, PosLerpFunctor, HprLerpFunctor, ScaleLerpFunctor, ColorLerpFunctor, PosHprLerpFunctor, HprScaleLerpFunctor, PosHprScaleLerpFunctor, ColorScaleLerpFunctor, PandaNode, PlaneNode, PointLight, RenderAttrib, RenderEffect, RenderEffects, RenderModeAttrib, RenderState, SelectiveChildNode, SequenceNode, ShowBoundsEffect, Spotlight, SwitchNode, TexMatrixAttrib, TextureApplyAttrib, TextureAttrib, TransformState, EventStoreTransform, TransparencyAttrib, PGButton, PGEntry, PGItem, PGMouseWatcherBackground, PGMouseWatcherGroup, PGMouseWatcherParameter, PGMouseWatcherRegion, PGTop, PGWaitBar, ActorNode, AngularForce, AngularVectorForce, BaseForce, ForceNode, LinearCylinderVortexForce, LinearDistanceForce, LinearForce, LinearFrictionForce, LinearJitterForce, LinearNoiseForce, LinearRandomForce, LinearSinkForce, LinearSourceForce, LinearUserDefinedForce, LinearVectorForce, Physical, PhysicalNode, PhysicsObject, BamReaderParam, ButtonEventList, FactoryParam, Person, Parent, Child, TypedWritableReferenceCount, WritableParam, RIBGraphicsWindow, RIBGraphicsStateGuardian, CasterShader, OutlineShader, PlanarReflector, ProjtexShader, ProjtexShadower, Shader, FrustumShader, SpheretexHighlighter, SpheretexReflector, SpheretexShader, SpotlightShader, TextFont, TextNode, ButtonThrower, DriveInterface, MouseWatcher, MouseWatcherGroup, MouseWatcherRegion, Trackball, Transform2SG, VrpnAnalogDevice, VrpnButtonDevice, VrpnClient, VrpnDialDevice, VrpnTrackerDevice, wcrGraphicsWindow, wglGraphicsPipe, wglGraphicsStateGuardian, wglGraphicsWindow, WinGraphicsPipe, WinGraphicsWindow, AnimChannel< ACScalarSwitchType >, AnimChannel< ACMatrixSwitchType >, MovingPart< ACScalarSwitchType >, MovingPart< ACMatrixSwitchType >, SimpleLerpFunctor< LPoint3f >, SimpleLerpFunctor< LVecBase3f >, and SimpleLerpFunctor< LVecBase4f >.

Definition at line 66 of file referenceCount.h.

ParametricCurve * ParametricCurveCollection::get_curve int  index  )  const [inline]
 

Returns the nth ParametricCurve in the collection.

Definition at line 56 of file parametricCurveCollection.I.

References _curves, and INLINE.

ParametricCurve * ParametricCurveCollection::get_default_curve  )  const
 

If there is an XYZ curve in the collection, returns it; otherwise, returns the first curve whose type is unspecified.

Returns NULL if no curve meets the criteria.

Definition at line 299 of file parametricCurveCollection.cxx.

ParametricCurve * ParametricCurveCollection::get_hpr_curve  )  const
 

Returns the first HPR curve in the collection, if any, or NULL if there are none.

Definition at line 273 of file parametricCurveCollection.cxx.

References _curves, and PCT_T.

Referenced by evaluate().

float ParametricCurveCollection::get_max_t  )  const [inline]
 

Returns the maximum T value associated with the last* curve in the collection.

Normally, this will be either the XYZ or HPR curve, or a timewarp curve.

Definition at line 75 of file parametricCurveCollection.I.

Referenced by CurveFitter::get_sample_hpr().

int ParametricCurveCollection::get_num_curves  )  const [inline]
 

Returns the number of ParametricCurves in the collection.

Definition at line 43 of file parametricCurveCollection.I.

References _curves, INLINE, nassertr, and NULL.

int ParametricCurveCollection::get_num_timewarps  )  const
 

Returns the number of timewarp curves in the collection.

Definition at line 326 of file parametricCurveCollection.cxx.

References NULL.

int ReferenceCount::get_ref_count  )  const [inline, inherited]
 

Returns the current reference count.

Definition at line 183 of file referenceCount.I.

Referenced by RenderState::determine_bin_index(), RenderEffects::determine_show_bounds(), FontPool::ns_garbage_collect(), TexturePool::ns_garbage_collect(), MaterialPool::ns_get_material(), and TexturePool::ns_release_texture().

ParametricCurve * ParametricCurveCollection::get_timewarp_curve int  n  )  const
 

Returns the nth timewarp curve in the collection.

Definition at line 349 of file parametricCurveCollection.cxx.

ParametricCurve * ParametricCurveCollection::get_xyz_curve  )  const
 

Returns the first XYZ curve in the collection, if any, or NULL if there are none.

Definition at line 251 of file parametricCurveCollection.cxx.

References NULL.

Referenced by evaluate().

bool ParametricCurveCollection::has_curve ParametricCurve curve  )  const
 

Returns true if the indicated ParametricCurve appears in this collection, false otherwise.

Definition at line 161 of file parametricCurveCollection.cxx.

References _curves, ParametricCurve::get_curve_type(), NULL, PCT_XYZ, prepare_remove_curve(), and PT.

void ReferenceCount::init_type void   )  [inline, static, inherited]
 

Reimplemented in AnimBundle, AnimBundleNode, AnimChannel< SwitchType >, AnimChannelBase, AnimChannelFixed< SwitchType >, AnimChannelMatrixXfmTable, AnimChannelScalarTable, AnimControl, AnimGroup, MovingPart< SwitchType >, MovingPartBase, MovingPartMatrix, MovingPartScalar, PartBundle, PartBundleNode, PartGroup, Character, CharacterJoint, CharacterJointBundle, CharacterSlider, ComputedVertices, CollisionEntry, CollisionHandler, CollisionHandlerEvent, CollisionHandlerFloor, CollisionHandlerPhysical, CollisionHandlerPusher, CollisionHandlerQueue, CollisionNode, CollisionPlane, CollisionPolygon, CollisionRay, CollisionSegment, CollisionSolid, CollisionSphere, CRGraphicsStateGuardian, CRSavedFrameBuffer, AnalogNode, ButtonNode, ClientAnalogDevice, ClientBase, ClientButtonDevice, ClientDevice, ClientDialDevice, ClientTrackerDevice, DialNode, MouseAndKeyboard, TrackerNode, VirtualMouse, DataNode, GraphicsChannel, GraphicsLayer, GraphicsPipe, GraphicsStateGuardian, GraphicsWindow, HardwareChannel, SavedFrameBuffer, CylindricalLens, FisheyeLens, ProjectionScreen, PSphereLens, DXGraphicsStateGuardian7, DXSavedFrameBuffer7, wdxGraphicsPipe7, wdxGraphicsWindow7, DXGraphicsStateGuardian8, DXSavedFrameBuffer8, wdxGraphicsPipe8, wdxGraphicsWindow8, EggAnimData, EggBin, EggBinMaker, EggComment, EggCoordinateSystem, EggCurve, EggData, EggExternalReference, EggFilenameNode, EggGroup, EggGroupNode, EggGroupUniquifier, EggMaterial, EggNamedObject, EggNameUniquifier, EggNode, EggNurbsCurve, EggNurbsSurface, EggObject, EggPoint, EggPolygon, EggPoolUniquifier, EggPrimitive, EggSAnimData, EggSurface, EggSwitchCondition, EggSwitchConditionDistance, EggTable, EggTexture, EggVertex, EggVertexPool, EggXfmAnimData, EggXfmSAnim, Event, EventStoreValueBase, RefCountProxy< Base >, RefCountObj< Base >, ThatThingie, ThisThingie, WhatAThingie, Thread, TypedReferenceCount, VirtualFile, VirtualFileComposite, VirtualFileSimple, WindowFramework, GLGraphicsStateGuardian, GLSavedFrameBuffer, glxGraphicsPipe, glxGraphicsStateGuardian, glxGraphicsWindow, dDrawable, Geom, GeomLine, GeomLinestrip, GeomPoint, GeomPolygon, GeomQuad, GeomSphere, GeomSprite, GeomTri, GeomTrifan, GeomTristrip, ImageBuffer, Lens, Material, MatrixLens, OrthographicLens, PerspectiveLens, PixelBuffer, Texture, GraphicsStateGuardianBase, Lerp, AutonomousLerp, LerpBlendType, EaseInBlendType, EaseOutBlendType, EaseInOutBlendType, NoBlendType, LerpFunctor, SimpleLerpFunctor< value >, SimpleQueryLerpFunctor< value >, MultiLerpFunctor, BoundingHexahedron, BoundingLine, BoundingSphere, BoundingVolume, FiniteBoundingVolume, GeometricBoundingVolume, OmniBoundingVolume, ClassicNurbsCurve, CubicCurveseg, HermiteCurve, NurbsPPCurve, ParametricCurve, PiecewiseCurve, RopeNode, AlphaTestAttrib, AmbientLight, BillboardEffect, Camera, ClipPlaneAttrib, ColorAttrib, ColorBlendAttrib, ColorScaleAttrib, ColorWriteAttrib, CompassEffect, CullBin, CullBinAttrib, CullBinBackToFront, CullBinFixed, CullBinFrontToBack, CullBinUnsorted, CullFaceAttrib, DecalEffect, DepthOffsetAttrib, DepthTestAttrib, DepthWriteAttrib, DirectionalLight, Fog, FogAttrib, GeomNode, LensNode, Light, LightAttrib, LightLensNode, LightNode, LODNode, MaterialAttrib, ModelNode, ModelRoot, NodePathComponent, PosLerpFunctor, HprLerpFunctor, ScaleLerpFunctor, ColorLerpFunctor, PosHprLerpFunctor, HprScaleLerpFunctor, PosHprScaleLerpFunctor, ColorScaleLerpFunctor, PandaNode, PlaneNode, PointLight, RenderAttrib, RenderEffect, RenderEffects, RenderModeAttrib, RenderState, SelectiveChildNode, SequenceNode, ShowBoundsEffect, Spotlight, SwitchNode, TexMatrixAttrib, TextureApplyAttrib, TextureAttrib, TransformState, EventStoreTransform, TransparencyAttrib, PGButton, PGEntry, PGItem, PGMouseWatcherBackground, PGMouseWatcherGroup, PGMouseWatcherParameter, PGMouseWatcherRegion, PGTop, PGWaitBar, ActorNode, AngularForce, AngularVectorForce, BaseForce, ForceNode, LinearCylinderVortexForce, LinearDistanceForce, LinearForce, LinearFrictionForce, LinearJitterForce, LinearNoiseForce, LinearRandomForce, LinearSinkForce, LinearSourceForce, LinearUserDefinedForce, LinearVectorForce, Physical, PhysicalNode, PhysicsObject, BamReaderParam, ButtonEventList, FactoryParam, Person, Parent, Child, TypedWritableReferenceCount, WritableParam, RIBGraphicsWindow, RIBGraphicsStateGuardian, CasterShader, OutlineShader, PlanarReflector, ProjtexShader, ProjtexShadower, Shader, FrustumShader, SpheretexHighlighter, SpheretexReflector, SpheretexShader, SpotlightShader, TextFont, TextNode, ButtonThrower, DriveInterface, MouseWatcher, MouseWatcherGroup, MouseWatcherRegion, Trackball, Transform2SG, VrpnAnalogDevice, VrpnButtonDevice, VrpnClient, VrpnDialDevice, VrpnTrackerDevice, wcrGraphicsWindow, wglGraphicsPipe, wglGraphicsStateGuardian, wglGraphicsWindow, WinGraphicsPipe, WinGraphicsWindow, AnimChannel< ACScalarSwitchType >, AnimChannel< ACMatrixSwitchType >, MovingPart< ACScalarSwitchType >, MovingPart< ACMatrixSwitchType >, SimpleLerpFunctor< LPoint3f >, SimpleLerpFunctor< LVecBase3f >, and SimpleLerpFunctor< LVecBase4f >.

Definition at line 69 of file referenceCount.h.

References INLINE.

Referenced by ConfigureFn(), and ThatThingie::get_class_type().

void ParametricCurveCollection::make_even float  max_t,
float  segments_per_unit
 

Discards all existing timewarp curves and recomputes a new timewarp curve that maps distance along the curve to parametric time, so that the distance between any two points in parametric time is proportional to the approximate distance of those same two points along the XYZ curve.

segments_per_unit represents the number of segments to take per each unit of parametric time of the original XYZ curve.

The new timewarp curve (and thus, the apparent range of the collection) will range from 0 to max_t.

Definition at line 397 of file parametricCurveCollection.cxx.

References NULL.

void ParametricCurveCollection::output ostream &  out  )  const
 

Writes a brief one-line description of the ParametricCurveCollection to the indicated output stream.

Definition at line 864 of file parametricCurveCollection.cxx.

void ParametricCurveCollection::prepare_add_curve ParametricCurve curve  )  [private]
 

Registers the curve with the list of drawers that share this collection, in preparation for adding it to the _curves list.

Definition at line 1140 of file parametricCurveCollection.cxx.

Referenced by add_curve(), and ParametricCurveCollection().

void ParametricCurveCollection::prepare_remove_curve ParametricCurve curve  )  [private]
 

Unregisters the curve with the list of drawers that share this collection, in preparation for removing it from the _curves list.

Definition at line 1161 of file parametricCurveCollection.cxx.

Referenced by has_curve(), and remove_curve().

int ParametricCurveCollection::r_add_curves PandaNode node  ) 
 

The recursive implementation of add_curves().

Definition at line 1017 of file parametricCurveCollection.cxx.

Referenced by add_curve().

bool ParametricCurveCollection::recompute  ) 
 

Ensures all the curves are freshly computed and up-to-date.

Returns true if everything is valid, false if at least one curve is incorrect.

Definition at line 789 of file parametricCurveCollection.cxx.

References CS_yup_left.

void ParametricCurveCollection::redraw  )  [private]
 

Calls redraw() on all drawers that share this collection.

Definition at line 1180 of file parametricCurveCollection.cxx.

Referenced by add_curve(), ParametricCurveCollection(), and remove_curve().

int ReferenceCount::ref  )  const [inline, inherited]
 

Explicitly increments the reference count.

User code should avoid using ref() and unref() directly, which can result in missed reference counts. Instead, let a PointerTo object manage the reference counting automatically.

This function is const, even though it changes the object, because generally fiddling with an object's reference count isn't considered part of fiddling with the object. An object might be const in other ways, but we still need to accurately count the number of references to it.

The return value is the new reference count.

Definition at line 225 of file referenceCount.I.

Referenced by ClientDevice::ClientDevice(), EggGroupNode::find_textures(), EggGroupNode::r_apply_texmats(), EggGroupNode::r_flatten_transforms(), and EggGroupNode::reverse_vertex_ordering().

void ParametricCurveCollection::register_drawer ParametricCurveDrawer drawer  ) 
 

Registers a Drawer with this curve collection that will automatically be updated whenever the collection is modified, so that the visible representation of the curve is kept up to date.

This is called automatically by the ParametricCurveDrawer.

Any number of Drawers may be registered with a particular curve collection.

Definition at line 1059 of file parametricCurveCollection.cxx.

void ParametricCurveCollection::remove_curve int  index  ) 
 

Removes the indicated ParametricCurve from the collection, by its index number.

Definition at line 142 of file parametricCurveCollection.cxx.

References _curves, prepare_remove_curve(), and redraw().

bool ParametricCurveCollection::remove_curve ParametricCurve curve  ) 
 

Removes the indicated ParametricCurve from the collection.

Returns true if the curve was removed, false if it was not a member of the collection.

Definition at line 113 of file parametricCurveCollection.cxx.

References _curves, nassertv, prepare_remove_curve(), PT, and redraw().

Referenced by add_curves().

void ParametricCurveCollection::reset_max_t float  max_t  ) 
 

Adjusts the apparent length of the curve by applying a new timewarp that maps the range [0..max_t] to the range [0..get_max_t()].

After this call, the curve collection will contain one more timewarp curve, and get_max_t() will return the given max_t value.

Definition at line 546 of file parametricCurveCollection.cxx.

References compose_matrix(), cs, evaluate(), and t.

bool ParametricCurveCollection::stitch const ParametricCurveCollection *  a,
const ParametricCurveCollection *  b
 

Regenerates this curve as one long curve: the first curve connected end-to-end with the second one.

Either a or b may be the same as 'this'. This will lose any timewarps on the input curves.

Returns true if successful, false on failure.

Definition at line 822 of file parametricCurveCollection.cxx.

References format_string().

void ReferenceCount::test_ref_count_integrity  )  const [inline, inherited]
 

Does some easy checks to make sure that the reference count isn't completely bogus.

Definition at line 328 of file referenceCount.I.

References INLINE.

Referenced by EggNode::determine_bin(), and ReferenceCount::~ReferenceCount().

int ReferenceCount::unref  )  const [inline, inherited]
 

Explicitly decrements the reference count.

Note that the object will not be implicitly deleted by unref() simply because the reference count drops to zero. (Having a member function delete itself is problematic; plus, we don't have a virtual destructor anyway.) However, see the helper function unref_delete().

User code should avoid using ref() and unref() directly, which can result in missed reference counts. Instead, let a PointerTo object manage the reference counting automatically.

This function is const, even though it changes the object, because generally fiddling with an object's reference count isn't considered part of fiddling with the object. An object might be const in other ways, but we still need to accurately count the number of references to it.

The return value is the new reference count.

Definition at line 293 of file referenceCount.I.

References INLINE.

Referenced by RenderState::determine_bin_index(), and RenderEffects::determine_show_bounds().

void ParametricCurveCollection::unregister_drawer ParametricCurveDrawer drawer  ) 
 

Removes a previously registered drawer from the list of automatically-refreshed drawers.

This is called automatically by the ParametricCurveDrawer.

Definition at line 1082 of file parametricCurveCollection.cxx.

void ParametricCurveCollection::write ostream &  out,
int  indent_level = 0
const
 

Writes a complete multi-line description of the ParametricCurveCollection to the indicated output stream.

Definition at line 883 of file parametricCurveCollection.cxx.

References _curves, _drawers, and ParametricCurve::register_drawer().

bool ParametricCurveCollection::write_egg ostream &  out,
const Filename filename,
CoordinateSystem  cs
 

Writes an egg description of all the nurbs curves in the collection to the specified output stream.

Returns true if the file is successfully written.

Definition at line 929 of file parametricCurveCollection.cxx.

bool ParametricCurveCollection::write_egg Filename  filename,
CoordinateSystem  cs = CS_default
 

Writes an egg description of all the nurbs curves in the collection to the specified output file.

Returns true if the file is successfully written.

Definition at line 904 of file parametricCurveCollection.cxx.

References _curves, _drawers, and ParametricCurve::unregister_drawer().


Member Data Documentation

ParametricCurves ParametricCurveCollection::_curves [private]
 

Definition at line 122 of file parametricCurveCollection.h.

Referenced by add_curve(), add_curves(), adjust_xyz(), evaluate(), get_curve(), get_hpr_curve(), get_num_curves(), has_curve(), ParametricCurveCollection(), remove_curve(), write(), write_egg(), and ~ParametricCurveCollection().

DrawerList ParametricCurveCollection::_drawers [private]
 

Definition at line 124 of file parametricCurveCollection.h.

Referenced by write(), and write_egg().


The documentation for this class was generated from the following files:
Generated on Fri May 2 00:53:08 2003 for Panda by doxygen1.3