VR-Vantage 2.7 API Documentation
Home
Modules
Namespaces
Classes
Files
Libraries
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
sensorFx
include
ciEntity.h
Go to the documentation of this file.
1
2
// Copyright JRM Enterprises, Inc. 2004 - 2012
3
// All rights reserved.
4
//
5
// This code is the intellectual property of JRM Enterprises, Inc.
6
// It may not be used or released as source or compiled binary form
7
// without the prior written consent of JRM Enterprises, Inc.
8
//
9
// Original Author: Michael Ortalano
10
// Date: Oct 2004
11
//
12
//
13
//
14
//
16
17
#if !defined(AFX_CIENTITY_H__DE81EF86_CAA9_471E_AE7A_9087CD4CB282__INCLUDED_)
18
#define AFX_CIENTITY_H__DE81EF86_CAA9_471E_AE7A_9087CD4CB282__INCLUDED_
19
20
#if _MSC_VER > 1000
21
#pragma once
22
#endif // _MSC_VER > 1000
23
24
#include "
ciApi.h
"
25
#include "
clXML.h
"
26
#include <stdio.h>
27
#include <string.h>
28
#include <iostream>
29
#include <fstream>
30
#include <memory.h>
31
#include <malloc.h>
32
#include <assert.h>
33
#include "
clXMLNode.h
"
38
class
CI_API
ciEntity
39
{
40
public
:
// enumerations
41
43
// EntityType
48
enum
EntityType
49
{
50
SigSim
,
51
SPIRITS
,
52
MUSES
,
53
EMat
,
54
};
55
57
// ClampingMode
62
enum
ClampingMode
63
{
64
NONE
= 0,
65
TERRAIN_CLAMP
,
66
TUNNEL_CLAMP
67
};
68
70
// enumTextureType
75
enum
enumTextureType
76
{
77
MCM
,
78
EMAT
79
};
80
81
public
:
// contructors, destructors and assignment operators
82
84
// ciEntity
89
ciEntity
();
90
92
// ciEntity
99
ciEntity
(
ciEntity
&
obj
);
100
102
// ~ciEntity
107
virtual
~
ciEntity
();
108
110
// operator =
118
ciEntity
operator =(
ciEntity
&
obj
);
119
121
// operator []
128
ciEntity
&operator [] (
int
idx);
129
130
public
:
// methods
131
133
// Add
142
bool
add(
ciEntity
entity);
143
145
// Insert
155
bool
insert(
ciEntity
entity,
int
placeBeforeIdx);
156
158
// Remove
166
bool
remove
(
int
entityIdx);
167
169
// Print
177
void
print();
178
180
// archive
189
bool
archive(std::ofstream &outf);
190
192
// serialize
200
int
serialize(
char
*filepath);
201
202
//
203
// loadXML
204
//
205
// \par Description:
206
// Loads attributes from an XML node
207
//
208
// \param clXMLNode* childNode
209
// \return bool
210
//
211
bool
loadXML(
clXMLNode
* childNode);
212
213
//
214
// parseXML
215
//
216
// \par Description:
217
// Parses an XML document for specific tags
218
//
219
// \param clXML xmlDocument
220
// \return bool
221
//
222
bool
parseXML(
clXML
& xmlDocument);
223
225
//loadXMLNode
232
bool
loadXMLNode(
std::string
tag,
char
*nodeString);
234
//loadXMLNode
241
bool
loadXMLNode(
std::string
tag,
bool
*nodeBool);
243
//loadXMLNode
250
bool
loadXMLNode(
std::string
tag,
int
*nodeBool);
252
//loadXMLNode
259
bool
loadXMLNode(
std::string
tag,
double
*nodeBool);
260
261
//
262
// saveXML
263
//
264
// \par Description:
265
// Saves XML nodes to an XML document
266
//
267
// \param clXML* xmlDocument
268
//
269
void
saveXML(
clXML
* xmlDocument);
270
272
//serializeCheck
278
int
serializeCheck(
char
*filepath);
279
281
// setIndex
288
void
setIndex
(
int
index
) {m_entityList[0].index =
index
;}
289
291
// getIndex
298
int
getIndex
() {
return
m_entityList[0].index;}
299
301
// getNumEntities
308
int
getNumEntities
() {
return
m_nEntities;}
310
//setNumEntities
315
void
setNumEntities
(
int
count
) {m_nEntities =
count
;}
316
318
// Getters and Setters
319
321
// GetName
328
char
*getName(
int
index
=0);
329
330
332
// SetName
340
void
setName(
const
char
*
name
,
int
index
=0);
341
double
getVelocity(
int
index
=0);
342
void
setVelocity(
double
velocity,
int
index
=0);
343
345
// GetGeomFileName
352
char
*getGeomFileName(
int
index
=0);
353
355
// SetGeomFileName
363
void
setGeomFileName(
char
*
name
,
int
index
=0);
364
366
// GetMatSysFileName
373
char
*getMatSysFileName(
int
index
=0);
374
376
// SetMatSysFileName
384
void
setMatSysFileName(
char
*
name
,
int
index
=0);
385
387
// getTextureType
395
int
getTextureType(
int
idx=0);
396
398
// setTextureType
407
void
setTextureType(
int
textureType,
int
idx=0);
408
410
// GetTrackFileName
417
char
*getTrackFileName(
int
index
=0);
418
420
// SetTrackFileName
428
void
setTrackFileName(
char
*
name
,
int
index
=0);
429
431
// GetEntityType
438
int
getEntityType(
int
index
=0);
439
440
442
// SetEntityType
450
void
setEntityType(
int
type
,
int
index
=0);
451
453
// GetThermalSpinUpPeriod
460
double
getThermalSpinUpPeriod(
int
index
=0);
461
463
// SetThermalSpinUpPeriod
472
void
setThermalSpinUpPeriod(
double
period,
int
index
= 0);
473
475
// setVisibility
484
void
setVisibility(
bool
visibility,
int
index
= 0);
485
487
// getVisibility
495
bool
getVisibility(
int
index
= 0);
496
498
// setClampMode
508
void
setClampMode(
int
clampMode,
int
index
= 0);
509
511
// getClampMode
520
int
getClampMode(
int
index
= 0);
521
523
// setUseTrackfile
532
void
setUseTrackfile(
bool
useTrackfile,
int
idx = 0);
533
535
// getUseTrackfile
543
bool
getUseTrackfile(
int
idx = 0);
544
546
// setWorldPosition
554
void
setWorldPosition(
double
x
,
double
y
,
double
z
,
int
i = 0);
555
557
// getWorldPosition
565
void
getWorldPosition(
double
&
x
,
double
&
y
,
double
&
z
,
int
i = 0);
566
568
// setGeodeticPosition
579
void
setGeodeticPosition(
double
latitude,
double
longitude,
double
altitude,
int
idx = 0);
580
582
// getGeodeticPosition
593
void
getGeodeticPosition(
double
&latitude,
double
&longitude,
double
&altitude,
int
idx = 0);
594
596
// setNEDOrientation
607
void
setNEDOrientation(
double
heading,
double
pitch,
double
roll,
int
idx = 0);
608
610
// getNEDOrientation
621
void
getNEDOrientation(
double
&heading,
double
&pitch,
double
&roll,
int
idx = 0);
622
624
// getRCSfilename
631
char
*getRCSfilename(
int
idx = 0);
632
634
// getRCSfilename
641
void
setRCSfilename(
char
*filename,
int
idx = 0);
642
644
// getSCfilename
651
char
*getSCfilename(
int
idx = 0);
652
654
// setSCfilename
661
void
setSCfilename(
char
*filename,
int
idx = 0);
662
664
// getPIPfilename
671
char
*getPIPfilename(
int
idx = 0);
672
674
// setPIPfilename
681
void
setPIPfilename(
char
*filename,
int
idx = 0);
682
683
684
void
setClampHeightOffset(
double
offset
,
int
idx = 0);
685
686
double
getClampHeightOffset(
int
idx = 0);
687
688
int
getBrdf(
int
idx = 0);
689
void
setBrdf(
int
brdf,
int
idx = 0);
690
double
getRoughness(
int
idx = 0);
691
void
setRoughness(
double
roughness,
int
idx = 0);
692
693
bool
getMmlsReflect(
int
idx = 0);
694
void
setMmlsReflect(
bool
mmlsReflect,
int
idx = 0);
695
bool
getThermalReflect(
int
idx = 0);
696
void
setThermalReflect(
bool
thermalReflect,
int
idx = 0);
697
double
getThermalReflectTemp(
int
idx = 0);
698
void
setThermalReflectTemp(
double
thermalReflectTemp,
int
idx = 0);
699
700
void
getThermalReflectExtent(
double
&
x
,
double
&
y
,
int
idx = 0);
701
void
setThermalReflectExtent(
double
x
,
double
y
,
int
idx = 0);
702
void
getThermalReflectOffset(
double
&
x
,
double
&
y
,
int
idx = 0);
703
void
setThermalReflectOffset(
double
x
,
double
y
,
int
idx = 0);
704
705
protected
:
// methods
706
707
private
:
// methods
708
709
private
:
// variables
710
712
// structEntityData
724
struct
structEntityData
725
{
726
int
index
;
727
char
entityName[128];
728
char
geomFileName[512];
729
char
matSysFileName[512];
730
int
textureType
;
731
int
entityType
;
732
double
thermalSpinUp
;
733
bool
visibility
;
734
int
clampMode
;
735
bool
useTrackfile
;
736
char
trackFileName[512];
737
double
worldX
;
738
double
worldY
;
739
double
worldZ
;
740
double
latitude
;
741
double
longitude
;
742
double
altitude
;
743
double
heading
;
744
double
pitch
;
745
double
roll
;
746
char
rcsFileName[512];
747
char
scFileName[512];
748
char
pipFileName[512];
749
double
velocity
;
750
double
clampHeightOffset
;
751
int
brdf
;
752
double
roughness
;
753
bool
mmlsReflect
;
754
bool
thermalReflect
;
755
double
thermalReflectTemp
;
756
double
thermalReflectExtentX
;
757
double
thermalReflectExtentY
;
758
double
thermalReflectOffsetX
;
759
double
thermalReflectOffsetY
;
760
} *m_entityList;
762
int
m_nEntities
;
763
clXML
m_xml
;
764
clXMLNode
*
m_parentNode
;
765
// ciEntity *m_ciEntityList; /*!< contiguous array of active ciEntity objects */
766
767
};
768
769
#endif // !defined(AFX_CIENTITY_H__DE81EF86_CAA9_471E_AE7A_9087CD4CB282__INCLUDED_)
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (
www.mak.com
)