447 std::vector<Point> mPoints;
448 std::unique_ptr<RndMesh> mMesh;
Stream of raw bytes, the base of the memory, file, and network streams.
Definition binstream.h:22
Text output stream.
Definition prnstream.h:16
virtual void Collide(const Segment &segment, std::list< Collision > &collisions)
Test a segment against the collideable and add what it strikes to a list.
RndCollideable()
Construct a collideable without children.
Definition rndcollideable.h:34
RndDrawable()
Construct a showing drawable without a highlight or children.
Definition rnddrawable.h:23
One point and what drawing derives from it.
Definition rndline.h:33
Vector2 & GetDir()
Definition rndline.h:82
const Vector2 & GetOffset() const
Definition rndline.h:92
const Vector3 & GetPoint() const
Definition rndline.h:107
void SetDir(const Vector2 &dir)
Definition rndline.h:87
const Vector3 & GetCamPoint() const
Definition rndline.h:47
Vector3 & GetPoint()
Definition rndline.h:112
Vector2 & GetScreen()
Definition rndline.h:127
const Vector2 & GetScreen() const
Definition rndline.h:122
Vector2 & GetOffset()
Definition rndline.h:97
const Color & GetColor() const
Definition rndline.h:62
void SetCamPoint(const Vector3 &point)
Definition rndline.h:57
void SetPoint(const Vector3 &point)
Definition rndline.h:117
Point()
Construct a white point at the origin.
Definition rndline.h:36
void SetColor(const Color &color)
Definition rndline.h:72
const Vector2 & GetDir() const
Definition rndline.h:77
void SetOffset(const Vector2 &offset)
Definition rndline.h:102
Color & GetColor()
Definition rndline.h:67
Vector3 & GetCamPoint()
Definition rndline.h:52
int DrawShowing() override
Build the ribbon facing the current camera and draw it.
static RndObject * New(const char *pszName)
Create a line.
Definition rndline.h:410
float GetWidth() const
Definition rndline.h:435
~RndLine() override
Delete the mesh.
const char * ClassName() const override
Report the class name.
Definition rndline.h:260
void ListDrawables(std::list< RndDrawable * > &drawables) override
Add the line, when its mesh has something to draw, then the children, to a list.
void BuildMesh()
Create the mesh for the points.
void BuildStrip(Point *pFirst, Point *pLast)
Fill the mesh positions with a ribbon through a run of points, extending the clipped points outside t...
const std::vector< Point > & GetPoints() const
Definition rndline.h:430
RndLine(const char *pszName)
Construct a white, unit-width line without points, with caps and a fold at a quarter turn.
void FindPointVerts(int nIndex, PointVerts &verts)
Find the mesh vertices of a point.
void SetPoint(int nIndex, const Vector3 &point)
Set the position of a point.
void SetHighlight(int nHighlight) override
Set the highlight of the mesh.
static const char * sClassName
The class name a .rnd file writes, Line.
Definition rndline.h:420
void Copy(const RndObject *pSource, int nFlags) override
Copy another line and its bases, then rebuild the mesh.
void Load(BinStream &stream) override
Read what Save() wrote, or an earlier version of it, then rebuild the mesh.
static int sRev
The format version Save() writes and Load() accepts.
Definition rndline.h:427
void Save(BinStream &stream) override
Write the line and its bases.
void ReleaseMesh()
Delete the mesh.
void DumpText(PrnStream &stream) override
Write a description of the line and its bases.
void BuildPair(Point *pFirst, Point *pSecond)
Fill the mesh positions with one segment of a line of pairs, or collapse it when both points are the ...
void SetFoldAngle(float fAngle)
Set the angle between segments at and beyond which the ribbon folds over.
void Collide(const Segment &segment, std::list< Collision > &collisions) override
Add each face of the mesh the segment strikes, as strikes of the line, then what the children strike,...
void SetPointColor(int nIndex, const Color &color)
Set the colour of a point and of its mesh vertices.
void ListDrawObjects(std::list< RndObject * > &objects) override
Add the material of the mesh to a list.
void SetWidth(float fWidth)
Definition rndline.h:440
void SetMat(RndMat *pMat)
Set the material of the mesh.
void Replace(RndObject *pFrom, RndObject *pTo) override
Replace a referenced object with another in the bases.
void SetNumPoints(int nPoints)
Set the number of points, then size the mesh, its texture coordinates, colours, and faces to match.
RndMat * Mat() const
Report the material of the mesh.
Surface description: blending, lighting colours, culling, and a list of texture stages.
Definition rndmat.h:20
One vertex.
Definition rndmesh.h:78
RndObject(const char *pszName)
Construct an object and register it under a name.
BinStream & operator>>(BinStream &stream, RndLine::Point &point)
Read a point the point writer wrote.
PrnStream & operator<<(PrnStream &stream, const RndLine::Point &point)
Write a point's position and colour.
Linear colour with four float components.
Definition color.h:12
The mesh vertices of a point.
Definition rndline.h:145
RndMesh::Vert * mVerts
Definition rndline.h:147
int mCaps
Definition rndline.h:146
Two points that fix a line or a segment.
Definition plane.h:39
Two-component vector, used for texture coordinates.
Definition vector2.h:12
Three-component vector, padded to a PlayStation 2 quadword.
Definition vector3.h:14