Package xj3d.filter.filters
Class TransformFilter
java.lang.Object
xj3d.filter.AbstractFilter
xj3d.filter.NewAbstractFilter
xj3d.filter.filters.TransformFilter
- All Implemented Interfaces:
BinaryContentHandler
,ContentHandler
,ProtoHandler
,RouteHandler
,ScriptHandler
,StringContentHandler
TransformFilter places up to n transforms around an object.
-scale1 1 2 1 -rotate2 0 1 0 3.1415
For each transform specified add a Transform around the input stream. So the above input would do this:
Arguments are:
- -scale1 x y z,
- -rotate1 x y z a(radians),
- -translate1 x y z, or
- -resetTransforms
-scale1 1 2 1 -rotate2 0 1 0 3.1415
For each transform specified add a Transform around the input stream. So the above input would do this:
DEF TRANSFORM_FILTER1 Transform { scale 1 2 1 children [ DEF TRANFORM_FILTER2 Transform { rotation 0 1 0 3.115 children [ .... <original content> ] } ] } ResetTransforms will remove any previous TransformFilter. This will only be detected if first node is a Transform. This allows multiple files to be combined together without error. This will be detected by using a DEF name of TRANSFORM_FILTER*.
- Version:
- $Revision: 1.0 $
- Author:
- Alan Hudson
-
Field Summary
Fields inherited from class xj3d.filter.NewAbstractFilter
fieldHasEndedImplicitly, parentTypeStack, suppressCalls
Fields inherited from class xj3d.filter.AbstractFilter
contentHandler, documentLocator, errorHandler, fieldHandler, fieldReader, fieldStack, lastErrorCode, majorVersion, minorVersion, nodeStack, parsingType, protoHandler, routeHandler, scriptHandler
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Declaration of the end of the document.void
endField()
Notification of the end of a field declaration.void
endNode()
Notification of the end of a node declaration.void
setArguments
(String[] args) Set the argument parameters to control the filter operation.void
startField
(String name) Notification of a field declaration.void
Notification of the start of a node.Methods inherited from class xj3d.filter.NewAbstractFilter
componentDecl, endExternProtoDecl, endProtoBody, endProtoDecl, endScriptDecl, exportDecl, externProtoURI, fieldValue, fieldValue, fieldValue, fieldValue, fieldValue, fieldValue, fieldValue, fieldValue, fieldValue, fieldValue, fieldValue, fieldValue, fieldValue, getContentHandler, getErrorReporter, getLastErrorCode, getProtoHandler, getRouteHandler, getScriptHandler, importDecl, metaDecl, profileDecl, protoFieldDecl, protoIsDecl, routeDecl, scriptFieldDecl, setContentHandler, setDebug, setDocumentLocator, setErrorReporter, setProtoHandler, setRouteHandler, setScriptHandler, startDocument, startExternProtoDecl, startProtoBody, startProtoDecl, startScriptDecl, suppressCalls, useDecl
Methods inherited from class xj3d.filter.AbstractFilter
setParsingType
-
Constructor Details
-
TransformFilter
public TransformFilter()
-
-
Method Details
-
endDocument
Declaration of the end of the document. There will be no further parsing and hence events after this.- Specified by:
endDocument
in interfaceContentHandler
- Overrides:
endDocument
in classNewAbstractFilter
- Throws:
SAVException
- This call is taken at the wrong time in the structure of the documentVRMLException
- The content provided is invalid for this part of the document or can't be parsed
-
startNode
Notification of the start of a node. This is the opening statement of a node and it's DEF name. USE declarations are handled in a separate method.- Specified by:
startNode
in interfaceContentHandler
- Overrides:
startNode
in classNewAbstractFilter
- Parameters:
name
- The name of the node that we are about to parsedefName
- The string associated with the DEF name. Null if not given for this node.- Throws:
SAVException
- This call is taken at the wrong time in the structure of the documentVRMLException
- The content provided is invalid for this part of the document or can't be parsed
-
endNode
Notification of the end of a node declaration.- Specified by:
endNode
in interfaceContentHandler
- Overrides:
endNode
in classNewAbstractFilter
- Throws:
SAVException
- This call is taken at the wrong time in the structure of the documentVRMLException
- The content provided is invalid for this part of the document or can't be parsed
-
startField
Notification of a field declaration. This notification is only called if it is a standard node. If the node is a script or PROTO declaration then theScriptHandler
orProtoHandler
methods are used.- Specified by:
startField
in interfaceContentHandler
- Overrides:
startField
in classNewAbstractFilter
- Parameters:
name
- The name of the field declared- Throws:
SAVException
- This call is taken at the wrong time in the structure of the documentVRMLException
- The content provided is invalid for this part of the document or can't be parsed
-
endField
Notification of the end of a field declaration. This is called only at the end of an MFNode declaration. All other fields are terminated by eitherNewAbstractFilter.useDecl(String)
orNewAbstractFilter.fieldValue(String)
.- Specified by:
endField
in interfaceContentHandler
- Overrides:
endField
in classNewAbstractFilter
- Throws:
SAVException
- This call is taken at the wrong time in the structure of the documentVRMLException
- The content provided is invalid for this part of the document or can't be parsed
-
setArguments
Set the argument parameters to control the filter operation.- Overrides:
setArguments
in classNewAbstractFilter
- Parameters:
args
- The array of argument parameters.
-