Renamed osg::CameraNode to osg::Camera, cleaned up osg::View.
Added beginnings of new osgViewer::Scene,View,Viewer,CompositeViewer and GraphicsWindowProxy files.
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
/**********************************************************************
|
||||
*
|
||||
* FILE: CameraNode.cpp
|
||||
* FILE: Camera.cpp
|
||||
*
|
||||
* DESCRIPTION: Read/Write osg::CameraNode in binary format to disk.
|
||||
* DESCRIPTION: Read/Write osg::Camera in binary format to disk.
|
||||
*
|
||||
* CREATED BY: Auto generated by iveGenerated
|
||||
* and later modified by Rune Schmidt Jensen.
|
||||
@@ -13,15 +13,15 @@
|
||||
**********************************************************************/
|
||||
|
||||
#include "Exception.h"
|
||||
#include "CameraNode.h"
|
||||
#include "Camera.h"
|
||||
#include "Transform.h"
|
||||
#include "Image.h"
|
||||
|
||||
using namespace ive;
|
||||
|
||||
void CameraNode::write(DataOutputStream* out){
|
||||
// Write CameraNode's identification.
|
||||
out->writeInt(IVECAMERANODE);
|
||||
void Camera::write(DataOutputStream* out){
|
||||
// Write Camera's identification.
|
||||
out->writeInt(IVECAMERA);
|
||||
|
||||
// If the osg class is inherited by any other class we should also write this to file.
|
||||
osg::Transform* transform = dynamic_cast<osg::Transform*>(this);
|
||||
@@ -29,7 +29,7 @@ void CameraNode::write(DataOutputStream* out){
|
||||
((ive::Transform*)(transform))->write(out);
|
||||
}
|
||||
else
|
||||
throw Exception("CameraNode::write(): Could not cast this osg::CameraNode to an osg::Group.");
|
||||
throw Exception("Camera::write(): Could not cast this osg::Camera to an osg::Group.");
|
||||
|
||||
|
||||
out->writeVec4(getClearColor());
|
||||
@@ -49,7 +49,7 @@ void CameraNode::write(DataOutputStream* out){
|
||||
|
||||
out->writeInt(getTransformOrder());
|
||||
|
||||
// Write CameraNode's properties.
|
||||
// Write Camera's properties.
|
||||
out->writeMatrixd(getProjectionMatrix());
|
||||
out->writeMatrixd(getViewMatrix());
|
||||
|
||||
@@ -88,13 +88,13 @@ void CameraNode::write(DataOutputStream* out){
|
||||
|
||||
}
|
||||
|
||||
void CameraNode::read(DataInputStream* in)
|
||||
void Camera::read(DataInputStream* in)
|
||||
{
|
||||
// Read CameraNode's identification.
|
||||
// Read Camera's identification.
|
||||
int id = in->peekInt();
|
||||
if(id == IVECAMERANODE)
|
||||
if(id == IVECAMERA)
|
||||
{
|
||||
// Code to read CameraNode's properties.
|
||||
// Code to read Camera's properties.
|
||||
id = in->readInt();
|
||||
// If the osg class is inherited by any other class we should also read this from file.
|
||||
osg::Transform* transform = dynamic_cast<osg::Transform*>(this);
|
||||
@@ -103,7 +103,7 @@ void CameraNode::read(DataInputStream* in)
|
||||
((ive::Transform*)(transform))->read(in);
|
||||
}
|
||||
else
|
||||
throw Exception("CameraNode::read(): Could not cast this osg::CameraNode to an osg::Group.");
|
||||
throw Exception("Camera::read(): Could not cast this osg::Camera to an osg::Group.");
|
||||
|
||||
setClearColor(in->readVec4());
|
||||
setClearMask(in->readUInt());
|
||||
@@ -166,6 +166,6 @@ void CameraNode::read(DataInputStream* in)
|
||||
}
|
||||
}
|
||||
else{
|
||||
throw Exception("CameraNode::read(): Expected CameraNode identification");
|
||||
throw Exception("Camera::read(): Expected Camera identification");
|
||||
}
|
||||
}
|
||||
@@ -50,7 +50,7 @@
|
||||
|
||||
#include "Group.h"
|
||||
#include "MatrixTransform.h"
|
||||
#include "CameraNode.h"
|
||||
#include "Camera.h"
|
||||
#include "CameraView.h"
|
||||
#include "Geode.h"
|
||||
#include "LightSource.h"
|
||||
@@ -1207,9 +1207,9 @@ osg::Node* DataInputStream::readNode()
|
||||
node = new osg::MatrixTransform();
|
||||
((ive::MatrixTransform*)(node))->read(this);
|
||||
}
|
||||
else if(nodeTypeID== IVECAMERANODE){
|
||||
node = new osg::CameraNode();
|
||||
((ive::CameraNode*)(node))->read(this);
|
||||
else if(nodeTypeID== IVECAMERA){
|
||||
node = new osg::Camera();
|
||||
((ive::Camera*)(node))->read(this);
|
||||
}
|
||||
else if(nodeTypeID== IVECAMERAVIEW){
|
||||
node = new osg::CameraView();
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
|
||||
#include "Group.h"
|
||||
#include "MatrixTransform.h"
|
||||
#include "CameraNode.h"
|
||||
#include "Camera.h"
|
||||
#include "CameraView.h"
|
||||
#include "Geode.h"
|
||||
#include "LightSource.h"
|
||||
@@ -927,8 +927,8 @@ void DataOutputStream::writeNode(const osg::Node* node)
|
||||
if(dynamic_cast<const osg::MatrixTransform*>(node)){
|
||||
((ive::MatrixTransform*)(node))->write(this);
|
||||
}
|
||||
else if(dynamic_cast<const osg::CameraNode*>(node)){
|
||||
((ive::CameraNode*)(node))->write(this);
|
||||
else if(dynamic_cast<const osg::Camera*>(node)){
|
||||
((ive::Camera*)(node))->write(this);
|
||||
}
|
||||
else if(dynamic_cast<const osg::CameraView*>(node)){
|
||||
((ive::CameraView*)(node))->write(this);
|
||||
|
||||
@@ -14,7 +14,7 @@ CXXFILES =\
|
||||
ClipNode.cpp\
|
||||
ClipPlane.cpp\
|
||||
ClusterCullingCallback.cpp\
|
||||
CameraNode.cpp\
|
||||
Camera.cpp\
|
||||
CameraView.cpp\
|
||||
ConeSector.cpp\
|
||||
ConvexPlanarOccluder.cpp\
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace ive {
|
||||
#define IVETEXGENNODE 0x00000025
|
||||
#define IVECLIPNODE 0x00000026
|
||||
#define IVEPROXYNODE 0x00000027
|
||||
#define IVECAMERANODE 0x00000028
|
||||
#define IVECAMERA 0x00000028
|
||||
#define IVECAMERAVIEW 0x00000029
|
||||
#define IVEAUTOTRANSFORM 0x00000030
|
||||
|
||||
|
||||
Reference in New Issue
Block a user