From Joakim Simmonsson, fixed various spelling typos in comments
This commit is contained in:
parent
161e01dc5d
commit
1489eeb228
@ -242,7 +242,7 @@ class UVList : public Record
|
||||
float32 u = in.readFloat32();
|
||||
float32 v = in.readFloat32();
|
||||
|
||||
// Add texture coodinates to geometry.
|
||||
// Add texture coordinates to geometry.
|
||||
if (_parent.valid())
|
||||
_parent->addVertexUV(layer,osg::Vec2(u,v));
|
||||
}
|
||||
|
@ -94,7 +94,7 @@ void Document::popExtension()
|
||||
_currentPrimaryRecord=_extensionStack.back().get();
|
||||
if (!_currentPrimaryRecord.valid())
|
||||
{
|
||||
osg::notify(osg::WARN) << "Can't descide primary in Document::popExtension()." << std::endl;
|
||||
osg::notify(osg::WARN) << "Can't decide primary in Document::popExtension()." << std::endl;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -95,7 +95,7 @@ class Document
|
||||
void setOptions(const osgDB::ReaderWriter::Options* options) { _options = options; }
|
||||
const osgDB::ReaderWriter::Options* getOptions() const { return _options.get(); }
|
||||
|
||||
// Current primar record
|
||||
// Current primary record
|
||||
void setCurrentPrimaryRecord(PrimaryRecord* record) { _currentPrimaryRecord=record; }
|
||||
PrimaryRecord* getCurrentPrimaryRecord() { return _currentPrimaryRecord.get(); }
|
||||
const PrimaryRecord* getCurrentPrimaryRecord() const { return _currentPrimaryRecord.get(); }
|
||||
|
@ -74,7 +74,7 @@ std::string ExportOptions::_tempDirOption( "tempDir" );
|
||||
std::string ExportOptions::_lightingOption( "lighting" );
|
||||
/** Value: "stripTextureFilePath".
|
||||
* If present in the Options string, the exporter strips the path from
|
||||
* texture file names, and writes only the texure file name to the FLT
|
||||
* texture file names, and writes only the texture file name to the FLT
|
||||
* Texture Palette. By default, the exporter doesn't strip the path,
|
||||
* and the name written to the Texture Palette is taken directly from
|
||||
* the osg::Image object referenced by the osg::Texture2D StateAttribute.
|
||||
|
@ -102,7 +102,7 @@ FltExportVisitor::FltExportVisitor( DataOutputStream* dos,
|
||||
_stateSetStack.push_back( ss );
|
||||
|
||||
|
||||
// Temp file for storing records. Need a temp file because we candon't
|
||||
// Temp file for storing records. Need a temp file because we don't
|
||||
// write header and palette until FltExportVisitor completes traversal.
|
||||
_recordsTempName = fltOpt->getTempDir() + "/ofw_temp_records";
|
||||
_recordsStr.open( _recordsTempName.c_str(), std::ios::out | std::ios::binary );
|
||||
@ -147,7 +147,7 @@ FltExportVisitor::apply( osg::Group& node )
|
||||
// A Group node could indicate one of many possible records.
|
||||
// Header record -- Don't need to support this here. We always output a header.
|
||||
// Group record -- HIGH
|
||||
// Child of an LOD node -- HIGH Curently write out a Group record regardless.
|
||||
// Child of an LOD node -- HIGH Currently write out a Group record regardless.
|
||||
// InstanceDefinition/InstanceReference -- MED -- multiparented Group is an instance
|
||||
// Extension record -- MED
|
||||
// Object record -- MED
|
||||
@ -212,7 +212,7 @@ FltExportVisitor::apply( osg::LOD& lodNode )
|
||||
_firstNode = false;
|
||||
ScopedStatePushPop guard( this, lodNode.getStateSet() );
|
||||
|
||||
// LOD center - same for all chilrden
|
||||
// LOD center - same for all children
|
||||
osg::Vec3d center = lodNode.getCenter();
|
||||
|
||||
// Iterate children of the LOD and write a separate LOD record for each,
|
||||
@ -239,7 +239,7 @@ void
|
||||
FltExportVisitor::apply( osg::MatrixTransform& node )
|
||||
{
|
||||
// Importer reads a Matrix record and inserts a MatrixTransform above
|
||||
// the corrent node. We need to do the opposite: Write a Matrix record
|
||||
// the current node. We need to do the opposite: Write a Matrix record
|
||||
// as an ancillary record for each child. We do that by storing the
|
||||
// MatrixTransform in each child's UserData. Each child then checks
|
||||
// UserData and writes a Matrix record if UserData is a MatrixTransform.
|
||||
@ -453,7 +453,7 @@ FltExportVisitor::apply( osg::Node& node )
|
||||
else
|
||||
{
|
||||
// Unknown Node. Warn and return.
|
||||
// (Note, if the base class of this Node was a Grouo, then apply(Group&)
|
||||
// (Note, if the base class of this Node was a Group, then apply(Group&)
|
||||
// would export a Group record then continue traversal. Because we are
|
||||
// a Node, there's no way to continue traversal, so just return.)
|
||||
std::string warning( "fltexp: Unknown Node in OpenFlight export." );
|
||||
@ -486,7 +486,7 @@ FltExportVisitor::complete( const osg::Node& node )
|
||||
// Done writing records, close the record data temp file.
|
||||
_recordsStr.close();
|
||||
|
||||
// Write OpenFlight file front matter: heqader, vertex palette, etc.
|
||||
// Write OpenFlight file front matter: header, vertex palette, etc.
|
||||
writeHeader( node.getName() );
|
||||
|
||||
writeColorPalette();
|
||||
|
@ -48,7 +48,7 @@ protected:
|
||||
{
|
||||
uint32 paletteSize = in.readUInt32();
|
||||
|
||||
// Enteries in vertex pool found by offset from start of this record.
|
||||
// Entries in vertex pool found by offset from start of this record.
|
||||
const int RECORD_HEADER_SIZE = 4;
|
||||
const int OFFSET = RECORD_HEADER_SIZE+sizeof(paletteSize);
|
||||
|
||||
|
@ -308,7 +308,7 @@ protected:
|
||||
|
||||
|
||||
// This object records parent palettes for external record support.
|
||||
// When an external record is parsed, this object is instatiated and populated with
|
||||
// When an external record is parsed, this object is instantiated and populated with
|
||||
// the parent model's palettes, then stored as UserData on the ProxyNode.
|
||||
// When the ReadExternalsVisitor hits the ProxyNode, it moves this object
|
||||
// into the ReaderWriter Options' UserData before calling osgDB::ReadNode,
|
||||
|
@ -313,7 +313,7 @@ class DegreeOfFreedom : public PrimaryRecord
|
||||
struct Range
|
||||
{
|
||||
float64 min; // Minimum value with respect to the local coord system
|
||||
float64 max; // Maximum value with respect to the local coordsystem
|
||||
float64 max; // Maximum value with respect to the local coord system
|
||||
float64 current; // Current value with respect to the local coord system
|
||||
float64 increment; // Increment
|
||||
};
|
||||
|
@ -59,7 +59,7 @@ bool RecordInputStream::readRecordBody(opcode_type opcode, size_type size, Docum
|
||||
|
||||
if (prototype)
|
||||
{
|
||||
#if 0 // for debuging
|
||||
#if 0 // for debugging
|
||||
{
|
||||
for (int i=0; i<document.level(); i++)
|
||||
cout << " ";
|
||||
|
@ -177,7 +177,7 @@ VertexPaletteManager::recordType( const osg::Array* v, const osg::Array* c,
|
||||
{
|
||||
if (t)
|
||||
{
|
||||
// Texture coordinstes
|
||||
// Texture coordinates
|
||||
if (n)
|
||||
return VERTEX_CNT;
|
||||
else
|
||||
@ -185,7 +185,7 @@ VertexPaletteManager::recordType( const osg::Array* v, const osg::Array* c,
|
||||
}
|
||||
else
|
||||
{
|
||||
// No textue coordinates
|
||||
// No texture coordinates
|
||||
if (n)
|
||||
return VERTEX_CN;
|
||||
else
|
||||
@ -354,7 +354,7 @@ VertexPaletteManager::asVec2Array( const osg::Array* in, const unsigned int n )
|
||||
}
|
||||
default:
|
||||
{
|
||||
osg::notify( osg::WARN ) << "fltexp: Unsupported array type in conv ersion to Vec2Array: " << arrayType << std::endl;
|
||||
osg::notify( osg::WARN ) << "fltexp: Unsupported array type in conversion to Vec2Array: " << arrayType << std::endl;
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
@ -214,7 +214,7 @@ class VertexCNT : public Record
|
||||
RegisterRecordProxy<VertexCNT> g_VertexCNT(VERTEX_CNT_OP);
|
||||
|
||||
|
||||
/** Absolut Vertex -
|
||||
/** Absolute Vertex -
|
||||
* version < 13
|
||||
*/
|
||||
class AbsoluteVertex : public Record
|
||||
|
@ -25,7 +25,7 @@ namespace flt
|
||||
{
|
||||
|
||||
|
||||
/** If the DataOutputStream paraqmeter is NULL, write to the _records
|
||||
/** If the DataOutputStream parameter is NULL, write to the _records
|
||||
member variable. Otherwise, write to the specified DataOutputStream.
|
||||
*/
|
||||
void
|
||||
@ -59,7 +59,7 @@ FltExportVisitor::writeComment( const osg::Node& node, DataOutputStream* dos )
|
||||
}
|
||||
}
|
||||
|
||||
/** If the DataOutputStream paraqmeter is NULL, write to the _records
|
||||
/** If the DataOutputStream parameter is NULL, write to the _records
|
||||
member variable. Otherwise, write to the specified DataOutputStream.
|
||||
*/
|
||||
void
|
||||
|
@ -494,7 +494,7 @@ FltExportVisitor::writeVertexList( int first, unsigned int count )
|
||||
|
||||
unsigned int idx;
|
||||
for( idx=0; idx<count; idx++)
|
||||
// I'm imaginining that 'first' will be a 0-based index into the
|
||||
// I'm imagining that 'first' will be a 0-based index into the
|
||||
// 'current' set of vertices held by the vertex palette manager.
|
||||
_records->writeInt32( _vertexPalette->byteOffset( first+idx ) );
|
||||
|
||||
@ -509,7 +509,7 @@ FltExportVisitor::writeVertexList( const std::vector<unsigned int>& indices, uns
|
||||
|
||||
unsigned int idx;
|
||||
for( idx=0; idx<count; idx++)
|
||||
// I'm imaginining that 'first' will be a 0-based index into the
|
||||
// I'm imagining that 'first' will be a 0-based index into the
|
||||
// 'current' set of vertices held by the vertex palette manager.
|
||||
_records->writeInt32( _vertexPalette->byteOffset( indices[ idx ] ) );
|
||||
|
||||
|
@ -661,7 +661,7 @@ FltExportVisitor::writeLightPoint( const osgSim::LightPointNode* lpn )
|
||||
return;
|
||||
|
||||
// In OSG, each LightPoint within a LightPointNode can have different appearance
|
||||
// parameters, but in OpenFlight, a Light Point Record contains a list of homogenous
|
||||
// parameters, but in OpenFlight, a Light Point Record contains a list of homogeneous
|
||||
// vertices. To be correct, we'd have to look at all LightPoints in the LightPointNode
|
||||
// and spew out multiple FLT records for each group that shared common appearance
|
||||
// parameters. Instead, we cheat: We take the first LightPoint and use its appearance
|
||||
@ -680,7 +680,7 @@ FltExportVisitor::writeLightPoint( const osgSim::LightPointNode* lpn )
|
||||
animPhaseDelay = lp0._blinkSequence->getPhaseShift();
|
||||
}
|
||||
|
||||
// Note that true bidirectional light points are currently unsupported (they are inavailable
|
||||
// Note that true bidirectional light points are currently unsupported (they are unavailable
|
||||
// in OSG, so we never write them out to FLT as BIDIRECTIONAL.
|
||||
int32 directionality( OMNIDIRECTIONAL );
|
||||
float32 horizLobe( 360.f );
|
||||
@ -734,7 +734,7 @@ FltExportVisitor::writeLightPoint( const osgSim::LightPointNode* lpn )
|
||||
_records->writeFloat32( 0.f ); // Directional falloff exponent
|
||||
_records->writeFloat32( 0.f ); // Directional ambient intensity
|
||||
_records->writeFloat32( animPeriod ); // Animation period in seconds
|
||||
_records->writeFloat32( animPhaseDelay ); // Animation phase delay in secnds
|
||||
_records->writeFloat32( animPhaseDelay ); // Animation phase delay in seconds
|
||||
_records->writeFloat32( animEnabled ); // Animation enabled period in seconds
|
||||
_records->writeFloat32( 1.f ); // Significance
|
||||
_records->writeInt32( 0 ); // Calligraphic draw order
|
||||
|
Loading…
Reference in New Issue
Block a user