Panda3D
Functions
ropeNode.cxx File Reference

PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University. More...

#include "ropeNode.h"
#include "cullTraverser.h"
#include "cullTraverserData.h"
#include "cullableObject.h"
#include "cullHandler.h"
#include "renderState.h"
#include "renderModeAttrib.h"
#include "colorAttrib.h"
#include "bamWriter.h"
#include "bamReader.h"
#include "datagram.h"
#include "datagramIterator.h"
#include "pStatTimer.h"
#include "geom.h"
#include "geomLines.h"
#include "geomTristrips.h"
#include "geomVertexWriter.h"
#include "boundingSphere.h"

Go to the source code of this file.

Functions

 CPT (GeomVertexFormat) RopeNode
 Returns the appropriate GeomVertexFormat for rendering, according to the user-specified requirements. More...
 

Detailed Description

PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.

All rights reserved.

All use of this software is subject to the terms of the revised BSD license. You should have received a copy of this license along with this source code in a file named "LICENSE."

Author
drose
Date
2002-12-04

Definition in file ropeNode.cxx.

Function Documentation

◆ CPT()

CPT ( GeomVertexFormat  )

Returns the appropriate GeomVertexFormat for rendering, according to the user-specified requirements.

Does the actual internal recompute. Draws the rope in RM_thread mode. This uses a GeomLinestrip to draw the rope in the simplest possible method, generally resulting in a one-pixel- wide curve.

In this mode, the thickness parameter represents a thickness in pixels, and is passed to the linestrip. However, you should be aware the DirectX does not support line thickness. This mode does not support per-vertex thickness. Draws the rope in RM_tape mode. This draws a series of triangle strips oriented to be perpendicular to the tube_up vector.

In this mode, thickness is in spatial units, and determines the width of the triangle strips. Draws the rope in RM_billboard mode. This draws a series of triangle strips oriented to be perpendicular to the camera plane.

In this mode, thickness is in spatial units, and determines the width of the triangle strips. Draws the rope in RM_tube mode. This draws a hollow tube centered around the string.

In this mode, thickness is in spatial units, and determines the diameter of the tube. Evaluates the string of vertices along the curve, and also breaks them up into connected segments.

Since the NurbsCurveEvaluator describes the curve as a sequence of possibly-connected piecewise continuous segments, this means joining together some adjacent segments from the NurbsCurveEvaluator into a single CurveSegment, if they happen to be connected (as most will be).

The return value is the total number of points across all segments. Calculates the vertices for a RM_thread render. This just copies the vertices more-or-less directly into the array. Calculates the vertices for a RM_billboard render. This puts a pair of vertices on either side of each computed point in curve_segments. Calculates the vertices for a RM_tube render. This puts a ring of vertices around each computed point in curve_segments. Computes the tangent to the curve at the indicated point in the segment.

Definition at line 234 of file ropeNode.cxx.