VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
rwVector.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2013 MaK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
13 
16 
17 #pragma once
18 
19 #include <matrix/vlVector.h>
22 
24 {
25 public:
27  DtRwVector(const DtString& name = DtString::nullString(),
28  DtReaderWriterRegistry* parentRegistry = NULL);
29 
30  DtRwVector(const DtSymbolString& name,
31  DtReaderWriterRegistry* parentRegistry = NULL);
32 
34  DtRwVector(double x, double y, double z,
35  const DtString& name = DtString::nullString(),
36  DtReaderWriterRegistry* parentRegistry = NULL);
37 
38  DtRwVector(double x, double y, double z,
39  const DtSymbolString& name,
40  DtReaderWriterRegistry* parentRegistry = NULL);
41 
43  DtRwVector(const DtVector & fromVec,
44  const DtString& name = DtString::nullString(),
45  DtReaderWriterRegistry* parentRegistry = NULL);
46 
47  DtRwVector(const DtVector & fromVec,
48  const DtSymbolString& name,
49  DtReaderWriterRegistry* parentRegistry = NULL);
50 
52  DtRwVector(const DtRwVector & orig,
53  DtReaderWriterRegistry* parentRegistry = NULL);
54 
56  DtRwVector(const DtString& name, const DtRwVector & orig,
57  DtReaderWriterRegistry* parentRegistry = NULL);
58 
60  DtRwVector & operator=(const DtRwVector & orig);
61  DtRwVector & operator=(const DtVector & orig);
62 
63  virtual ~DtRwVector();
64 
67  virtual void putData(DtEnvironmentSP, DtEnvValueSP parent) const;
68  virtual void getData(const DtEnvironmentSP, const DtEnvValueSP value,
71 
73  static const char* theXmlType();
74 
75  virtual const char* xmlType() const
76  {
77  return theXmlType();
78  }
80 
81  virtual void putData(std::string& fp, int indentLevel = 0);
82  virtual DtlObjPtr getData(DtlObjPtr args, const DtReaderWriter::SearchPaths& searchPaths,
83  const DtVariableBindingsList& variableBindings);
84 
85  virtual double distSquaredTo(const DtVector& point) const;
86 
90  virtual const char* readerWriterType() const;
91 
93  virtual DtString prettyPrint() const;
94 
95  bool operator==(const DtRwVector&) const;
96  bool operator!=(const DtRwVector& rhs) const { return !(*this == rhs); };
97 
99  virtual double value() const { return magnitudeSquared(); };
100 
101 protected:
102 
103 };
104 
105 
110 {
111 public:
113  DtRwOffsetVector(const DtString& name = DtString::nullString(),
114  DtReaderWriterRegistry* parentRegistry = NULL);
115 
116  DtRwOffsetVector(const DtSymbolString& name,
117  DtReaderWriterRegistry* parentRegistry = NULL);
118 
120  DtRwOffsetVector(double x, double y, double z,
121  const DtString& name = DtString::nullString(),
122  DtReaderWriterRegistry* parentRegistry = NULL);
123 
124  DtRwOffsetVector(double x, double y, double z,
125  const DtSymbolString& name,
126  DtReaderWriterRegistry* parentRegistry = NULL);
127 
129  DtRwOffsetVector(const DtVector & fromVec,
130  const DtString& name = DtString::nullString(),
131  DtReaderWriterRegistry* parentRegistry = NULL);
132 
133  DtRwOffsetVector(const DtVector & fromVec,
134  const DtSymbolString& name,
135  DtReaderWriterRegistry* parentRegistry = NULL);
136 
137  DtRwOffsetVector(const DtString& name, const DtRwOffsetVector & fromVec,
138  DtReaderWriterRegistry* parentRegistry = NULL);
139 
140  virtual ~DtRwOffsetVector();
141 
144  virtual void putData(DtEnvironmentSP, DtEnvValueSP parent) const;
145  virtual void getData(const DtEnvironmentSP, const DtEnvValueSP value,
147  const DtVariableBindingsList& bindings = DtVariableBindingsList());
148  virtual DtlObjPtr getData(DtlObjPtr args, const DtReaderWriter::SearchPaths& searchPaths,
149  const DtVariableBindingsList& variableBindings);
150 
152  static const char* theXmlType();
153 
154  virtual const char* xmlType() const
155  {
156  return theXmlType();
157  }
159 
161  DtRwOffsetVector(const DtRwOffsetVector & orig,
162  DtReaderWriterRegistry* parentRegistry = NULL);
163 
166  DtRwOffsetVector & operator=(const DtRwVector & orig);
167  DtRwOffsetVector & operator=(const DtVector & orig);
168 
172  virtual const char* readerWriterType() const;
173 
175 
176  virtual void setFront(double);
177  virtual double front() const;
179 
181 
182  virtual void setRight(double);
183  virtual double right() const;
185 
187 
188  virtual void setUp(double);
189  virtual double up() const;
191 };
192 
bool operator==(const DtReaderWriter &) const
Equivalence operator.
virtual const char * xmlType() const
Routines to archive/dearchive from an XML Environment.
Definition: rwVector.h:154
virtual const char * readerWriterType() const
Used to supply a string type that this reader writer type is. This can be used in place of dynamic-ca...
#define DT_DLL_readerWriter
This file is used to determine how to build Disable inconsistent dll linkage warning Visual Studio 6...
Definition: readerWriterDefines.h:34
virtual double value() const
Returns magnitude squared.
Definition: rwVector.h:99
This class allows one to collect and compare strings using an index number instead of having to do st...
Definition: symbolString.h:27
DT_DLL_readerWriter DtBoost::shared_ptr< DtEnvironment > DtEnvironmentSP
Definition: readerWriter.h:30
virtual DtlObjPtr getData(DtlObjPtr args, const SearchPaths &searchPaths, const DtVariableBindingsList &variableBindings)
Deriving class overrides these to get/put class specific data.
Definition: readerWriter.h:85
virtual const char * xmlType() const
Routines to archive/dearchive from an XML Environment.
Definition: rwVector.h:75
Definition: readerWriterRegistry.h:39
virtual DtString prettyPrint() const
Routine to return a human readable form of the reader/writer variable. Not all reader/writer classes ...
static const char * theXmlType()
The type that is used when archiving to an XML stream.
virtual void getData(const DtEnvironmentSP, const DtEnvValueSP value, const DtReaderWriter::SearchPaths &searchPaths=DtReaderWriter::SearchPaths(), const DtVariableBindingsList &bindings=DtVariableBindingsList())
Routines to archive/dearchive from an XML Environment.
Definition: rwVector.h:23
DtRwVector & operator=(const DtRwVector &orig)
Assign to DtRwVector. Assigns value only.
virtual void putData(DtEnvironmentSP, DtEnvValueSP parent) const
Routines to archive/dearchive from an XML Environment.
std::list< const DtRwVariableBindings * > DtVariableBindingsList
Definition: readerWriterRegistry.h:29
std::vector< DtFilename > SearchPaths
Definition: readerWriter.h:92
virtual void putData(std::string &fp, int indentLevel=0)
Deriving class overrides these to get/put class specific data.
Specialized vector that can be used for the knowledge of an &quot;offset&quot; rather than location vector...
Definition: rwVector.h:109
bool operator!=(const DtRwVector &rhs) const
Definition: rwVector.h:96
const DtReaderWriter & operator=(const DtReaderWriter &orig)
assignment operator
static const char * theXmlType()
The type that is used when archiving to an XML stream.
virtual const char * readerWriterType() const
Used to supply a string type that this reader writer type is. This can be used in place of dynamic-ca...

Document ID: Generated on Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)