466 enum { kVertexSlotBody = 0, kVertexSlotStartCap = 1, kVertexSlotEndCap = 2 };
474 void ResolvePointVertexSlot(
unsigned nIndex, VertexSlot &slot);
509 void EmitRibbonVerts(Point *pFirst, Point *pLast);
518 std::vector<Point> mPoints;
Heap-allocated NUL-terminated string.
Definition hxstr.h:41
Collideable()
Construct a collideable with no children.
Sink that the engine formats its diagnostic and failure text into.
Definition dbg.h:33
Drawable()
Construct a visible drawable with no children.
Surface description a Rnd::Mesh draws with.
Definition mat.h:36
Indexed triangle mesh with one material.
Definition mesh.h:46
Base of every object the renderer can load, resolve by name, and serialise.
Definition object.h:43
Byte stream that every renderer object serialises itself through.
Definition stream.h:31
void SetMat(Mat *pMat)
Set the material the ribbon draws with.
void SetPointPos(int nIndex, const Vector3 &pos)
Move one point.
void SetLinePairs(int nLinePairs)
Set whether consecutive points form independent segments rather than one continuous ribbon.
virtual void SetHighlight(int nHighlight)
Pass the highlight treatment to the owned mesh.
static void Init()
Register the class key with Rnd::TheManager.
float GetFoldAngle() const
Report the bend the ribbon folds at.
virtual ~String()
Release the owned mesh and the point vector.
void SetNumPoints(int nCount)
Resize the ribbon to nCount points and rebuild the mesh around it.
virtual const HxStr & ClassName() const
Report the class key a .rnd file writes for a ribbon.
void SetFoldAngle(float flAngle)
Set the bend the ribbon folds at and cache its cosine.
virtual void Copy(const Object *pSource, unsigned nFlags)
Copy the state of pSource into this ribbon.
virtual void DumpText(Dbg &sink)
Write a description of this ribbon to sink.
static String * New(const HxStr &name)
Build a ribbon the class registry vends.
virtual int DrawShowing()
Project every point and redraw the owned mesh through it.
int NumPoints() const
Report how many points the ribbon runs through.
static Object * NewObject(const HxStr &name)
Build a ribbon for the class registry.
void SetWidth(float flWidth)
Set the width of the ribbon in screen units.
Definition string.h:233
void SetPointColor(int nIndex, const Color &color)
Set the colour of one point and of the mesh vertices it governs.
virtual void FindCollisions(const Segment &ray, std::list< Collision > &collisions)
Test a ray against the owned mesh and report the intersections as this object.
virtual void Replace(Object *pFrom, Object *pTo)
Repoint the base subobjects when an object they address is replaced.
int GetLinePairs() const
Report the line-pair flag.
String(const HxStr &name)
Construct an empty ribbon and its mesh.
void SetHasCaps(int nHasCaps)
Set whether the ribbon ends in a pair of tapering caps.
Vector3 * GetPointPos(int nIndex)
Report the address of the position of one point.
Mat * GetMat() const
Report the material the ribbon draws with.
virtual void Load(Stream &stream)
Read this ribbon's serialised form from stream.
int GetHasCaps() const
Report the cap flag.
Color * PointColor(int nIndex)
Report the address of the colour of one point.
float GetWidth() const
Report the width of the ribbon in screen units.
virtual void Save(Stream &stream)
Write this ribbon's serialised form to stream.
The rendering engine.
Definition animhelper.h:3
HxStr g_stringClassName
Class key a .rnd file writes for a ribbon.
Linear colour with four float components.
Definition color.h:10
One vertex of a Rnd::Mesh.
Definition meshvert.h:22
Line segment a collision query is run along.
Definition collideable.h:22
Vector3 mCamPos
Definition string.h:83
Point()
Construct a point at the origin, coloured white.
Color mColor
Definition string.h:82
Vector2 mDir
Definition string.h:85
int mClipped
Definition string.h:87
int mReserved4c
Definition string.h:88
Vector2 mScreen
Definition string.h:84
Vector2 mNormal
Definition string.h:86
Vector3 mPos
Definition string.h:81
Two-component vector, used for texture coordinates.
Definition vector2.h:10
Three-component vector, padded to a PlayStation 2 quadword.
Definition vector3.h:12