55#define MAX_STREAK_SUBDIV_LEVELS 7
108 DEBUG_ASSERTCRASH(lv == 0, (
"Streak renderer does not work for non-zero subdivisions"));
109 SubdivisionLevel = lv; SubdivisionLevel = 0;
117 void Set_Merge_Intersections(
int onoff) {
if (onoff) { Bits |= MERGE_INTERSECTIONS; }
else { Bits &= ~MERGE_INTERSECTIONS; }; }
118 void Set_Freeze_Random(
int onoff) {
if (onoff) { Bits |= FREEZE_RANDOM; }
else { Bits &= ~FREEZE_RANDOM; }; }
119 void Set_Disable_Sorting(
int onoff) {
if (onoff) { Bits |= DISABLE_SORTING; }
else { Bits &= ~DISABLE_SORTING; }; }
120 void Set_End_Caps(
int onoff) {
if (onoff) { Bits |= END_CAPS; }
else { Bits &= ~END_CAPS; }; }
127 unsigned int point_count,
133 unsigned int point_count,
138 unsigned int *personalities);
143 void subdivision_util(
unsigned int point_cnt,
const Vector3 *xformed_pts,
144 const float *base_tex_v,
unsigned int *p_sub_point_cnt,
145 Vector3 *xformed_subdiv_pts,
float *subdiv_tex_v);
155 unsigned int SubdivisionLevel;
156 float NoiseAmplitude;
161 float MergeAbortFactor;
174 enum BitShiftOffsets {
175 TEXTURE_MAP_MODE_OFFSET = 24
178 MERGE_INTERSECTIONS = 0x00000001,
179 FREEZE_RANDOM = 0x00000002,
180 DISABLE_SORTING = 0x00000004,
181 END_CAPS = 0x00000008,
184 TEXTURE_MAP_MODE_MASK = 0xFF000000,
194 unsigned int m_vertexBufferSize;
202 return (
TextureMapMode)((Bits & TEXTURE_MAP_MODE_MASK) >> TEXTURE_MAP_MODE_OFFSET);
207 Bits &= ~TEXTURE_MAP_MODE_MASK;
208 Bits |= ((mode << TEXTURE_MAP_MODE_OFFSET) & TEXTURE_MAP_MODE_MASK);
#define DEBUG_ASSERTCRASH(c, m)
int Is_Merge_Intersections(void) const
int Is_Freeze_Random(void) const
const Vector3 & Get_Color(void) const
void Set_Merge_Abort_Factor(float factor)
float Get_Noise_Amplitude(void) const
TextureMapMode Get_Texture_Mapping_Mode(void) const
void Set_Shader(ShaderClass shader)
@ UNIFORM_WIDTH_TEXTURE_MAP
@ UNIFORM_LENGTH_TEXTURE_MAP
void Set_Texture_Mapping_Mode(TextureMapMode mode)
void Set_Noise_Amplitude(float amplitude)
void Set_Disable_Sorting(int onoff)
void Set_Current_Subdivision_Level(unsigned int lv)
unsigned int Get_Current_Subdivision_Level(void) const
int Are_End_Caps_Enabled(void) const
void Init(const W3dEmitterLinePropertiesStruct &props)
int Is_Sorting_Disabled(void) const
void Set_Width(float width)
void Set_Freeze_Random(int onoff)
void RenderStreak(RenderInfoClass &rinfo, const Matrix3D &transform, unsigned int point_count, Vector3 *points, Vector4 *colors, float *widths, const SphereClass &obj_sphere, unsigned int *personalities)
void Set_Texture(TextureClass *texture)
float Get_Merge_Abort_Factor(void) const
float Get_Opacity(void) const
void Set_Color(const Vector3 &color)
~StreakRendererClass(void)
StreakRendererClass(void)
float Get_Width(void) const
void Set_Opacity(float opacity)
TextureClass * Peek_Texture(void) const
friend class SegmentedLineClass
TextureClass * Get_Texture(void) const
void Render(RenderInfoClass &rinfo, const Matrix3D &transform, unsigned int point_count, Vector3 *points, const SphereClass &obj_sphere)
void Set_End_Caps(int onoff)
StreakRendererClass & operator=(const StreakRendererClass &that)
ShaderClass Get_Shader(void) const
void Set_Merge_Intersections(int onoff)