Panda3D
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions
FltCurve Class Reference

A single curve, like a Bezier or B-Spline. More...

#include "fltCurve.h"

Inheritance diagram for FltCurve:
FltBeadID FltBead FltRecord TypedReferenceCount TypedObject ReferenceCount MemoryBase MemoryBase

List of all members.

Public Types

typedef pvector< LPoint3dControlPoints
enum  CurveType { CT_b_spline = 4, CT_cardinal = 5, CT_bezier = 6 }

Public Member Functions

 FltCurve (FltHeader *header)
virtual TypeHandle force_init_type ()
const LPoint3dget_control_point (int n) const
 Returns the nth control point assigned to the curve.
int get_num_control_points () const
 Returns the number of control points assigned to the curve.
virtual TypeHandle get_type () const

Static Public Member Functions

static TypeHandle get_class_type ()
static void init_type ()
 This function is declared non-inline to work around a compiler bug in g++ 2.96.

Public Attributes

ControlPoints _control_points
CurveType _curve_type

Protected Member Functions

virtual bool build_record (FltRecordWriter &writer) const
 Fills up the current record on the FltRecordWriter with data for this record, but does not advance the writer.
virtual bool extract_record (FltRecordReader &reader)
 Fills in the information in this bead based on the information given in the indicated datagram, whose opcode has already been read.

Detailed Description

A single curve, like a Bezier or B-Spline.

Definition at line 29 of file fltCurve.h.


Member Function Documentation

bool FltCurve::build_record ( FltRecordWriter writer) const [protected, virtual]

Fills up the current record on the FltRecordWriter with data for this record, but does not advance the writer.

Returns true on success, false if there is some error.

Reimplemented from FltBeadID.

Definition at line 75 of file fltCurve.cxx.

References Datagram::add_be_float64(), Datagram::add_be_int32(), FltBeadID::build_record(), Datagram::pad_bytes(), FltRecordWriter::set_opcode(), and FltRecordWriter::update_datagram().

bool FltCurve::extract_record ( FltRecordReader reader) [protected, virtual]

Fills in the information in this bead based on the information given in the indicated datagram, whose opcode has already been read.

Returns true on success, false if the datagram is invalid.

Reimplemented from FltBeadID.

Definition at line 42 of file fltCurve.cxx.

References FltRecord::check_remaining_size(), FltBeadID::extract_record(), FltRecordReader::get_iterator(), FltRecordReader::get_opcode(), and DatagramIterator::skip_bytes().

const LPoint3d & FltCurve::get_control_point ( int  n) const [inline]

Returns the nth control point assigned to the curve.

Definition at line 33 of file fltCurve.I.

int FltCurve::get_num_control_points ( ) const [inline]

Returns the number of control points assigned to the curve.

Definition at line 23 of file fltCurve.I.

static void FltCurve::init_type ( ) [inline, static]

This function is declared non-inline to work around a compiler bug in g++ 2.96.

Making it inline seems to cause problems in the optimizer.

Reimplemented from FltBeadID.

Definition at line 61 of file fltCurve.h.


The documentation for this class was generated from the following files:
 All Classes Functions Variables Enumerations