VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtFilledPolygonInterface.h
Go to the documentation of this file.
1 /******************************************************************************
2  * Copyright (c) 2023 MAK Technologies, Inc.
3  * All rights reserved.
4  *****************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvCore/vrvCore.h>
15 
17 
18 namespace makVrv
19 {
20  class DtChannel;
21  class DtTexturedOutlinedPolygonInterface;
22  class DtTextureInterface;
23 
27  {
28  public:
29 
30  enum FillType
31  {
32  Fill_Solid = 0,
35  FillType_End
36  };
37 
40 
42  virtual ~DtFilledPolygonInterface();
43 
47  virtual void setFillType(FillType type) = 0;
48 
50  virtual FillType fillType() const = 0;
51 
53 
56  virtual void setFillParameter(unsigned int param, unsigned int fullStipplePattern[32] = 0) = 0;
57 
60  virtual void setFillTexture(DtTextureInterface* textureHandle) = 0;
61 
63  virtual void clearFillPattern() = 0;
64 
66  virtual void getFillParameter(unsigned int& paramOut, unsigned int fullStipplePatternOut[32]) const = 0;
67 
73  virtual void setFillPatternFrequency(float frequency) = 0;
74 
79  virtual void setEventsEnabled(bool enabled, unsigned long long = 0) = 0;
80 
82  virtual bool eventsEnabled() const = 0;
83 
86  virtual void setVertexCount(unsigned int vertexCount) = 0;
87 
89  virtual unsigned int vertexCount() const = 0;
90 
92  virtual void set2DPositions(const std::vector<float>& vertices) = 0;
93 
96  virtual void set2DPosition(unsigned int vertexIndex, float x, float y) = 0;
97 
99  virtual void set2DCentroidPosition(float x, float y) = 0;
100 
102  virtual void get2DPosition(unsigned int vertexIndex, float& x, float& y) const = 0;
103 
105  virtual void set3DPosition(unsigned int vertexIndex, float x, float y, float z, float w) = 0;
106 
108  virtual void set3DCentroidPosition(float x, float y, float z, float w) = 0;
109 
111  virtual void get3DPosition(unsigned int index, float& x, float& y, float& z, float& w) const = 0;
112 
113  virtual void set3DDirectionAndLength(unsigned int index, float x, float y, float z, float l) = 0;
114 
121  virtual void projectUVCoordinates(const DtVector& origin,
122  const DtVector& axisU, const DtVector& axisV, float scale = 1.0f) = 0;
123 
125  virtual void setStipple(unsigned int stipplePattern) = 0;
126 
128  virtual void setVertexColor(unsigned int index, float r, float g, float b, float a) = 0;
129 
131  virtual void getVertexColor(unsigned int index, float& r, float& g, float& b, float& a) = 0;
132 
134  virtual void setCentroidColor(float r, float g, float b, float a) = 0;
135 
137  virtual void setColor(float r, float g, float b, float a) = 0;
138 
140  virtual void getColor(float& r, float& g, float& b, float& a) const = 0;
141 
143  virtual int group() const = 0;
144 
146  virtual void setGroup(int) = 0;
147 
150  virtual void triangulate() = 0;
151 
158  virtual void set2DPositionsTriangles(const std::vector<float>& vertices) = 0;
159 
163  virtual void setVertexCountTriangles(unsigned int vertexCount) = 0;
164 
165  };
166 
169  {
170  public:
173  static DtFilledPolygonInterfaceCreator& instance(DtDe&);
174 
176  static void registerInstance(DtDe& de, DtFilledPolygonInterfaceCreator* anInstance);
177 
179  virtual DtFilledPolygonInterface* create(DtDe& de, DtChannel* channel, DtModelSetId modelSet) = 0;
180  };
181 
182 }
183 
Virtual base class. Allows for RTTI and proper virtual destruction. Used by Creators, Factories, Providers, Assemblers and User Interfaces.
Definition: DtVirtualBaseClass.h:19
A variable vertex convex filled 2D polygon.
Definition: DtFilledPolygonInterface.h:26
Creator.
Definition: DtFilledPolygonInterface.h:168
voidpf uLong int origin
Definition: ioapi.h:42
Interface for a texture. Used to pass in a texture to vrvGraphics.
Definition: DtTextureInterface.h:24
An abstract interface for a polygon primitive.
Definition: DtPolygonInterface.h:21
Definition: DtFilledPolygonInterface.h:34
The abstract Channel Class.
Definition: DtChannel.h:35
Contains makVrv::DtVirtualBaseClass class.
#define DT_DLL_VRVCORE
Definition: vrvCore.h:20
FillType
Definition: DtFilledPolygonInterface.h:30
Contains the makVrv::DtPolygonInterface class declaration.
The DtDe is the core component of any VR-Vantage application. It owns a DtRenderer, DtDeCommunicator, as well as a DtDisplay and other things.
Definition: DtDe.h:72
DtModelSetId
Definition: DtModelSetEnums.h:19
Contains various enum classes relating to model sets.
Definition: DtFilledPolygonInterface.h:33
Contains DLL export macros.

Document ID: Generated on Tue Sep 24 19:28:17 EDT 2024 from SVN revision 269799
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)