Inherits DD::Image::FileHandler.
Classes | |
class | Description |
Specialised GeoWriter Description. More... | |
Public Member Functions | |
GeoWriter (WriteGeo *) | |
~GeoWriter () override | |
virtual void | frame (int) |
virtual void | execute (Scene &scene) |
virtual bool | animation () const |
virtual int | split_input (int i) const |
virtual void | finish () |
void | knobs (Knob_Callback cb) override |
int | knob_changed (Knob *knob) override |
Protected Member Functions | |
int | frame () const |
GeoOp * | input0 () |
const char * | filename () const |
void | status (float amount) const |
bool | open () |
bool | close () |
bool | write (const void *, FILE_OFFSET) |
bool | write (FILE_OFFSET, const void *, FILE_OFFSET) |
bool | seek (FILE_OFFSET) |
FILE_OFFSET | tell () const |
Protected Attributes | |
WriteGeo * | geo |
Points at the WriteGeo that created this. | |
void * | file |
Actually a FILE* but I don't want the <stdio.h> header! | |
FILE_OFFSET | offset |
Current offset into file. | |
Friends | |
class | WriteGeo |
Writes data to a geometry file.
The WriteGeo creates one of these for every different filename it writes. Each different file type is a different subclass. Each subclass defines a Writer_Description object, all of these are searched to figure out what subclass to use.
The implementation of the base class is in WriteGeo.C
GeoWriter::GeoWriter | ( | WriteGeo * | i | ) |
|
override |
|
inlineprotected |
Frame number to write.
|
inlineprotected |
|
inlineprotected |
Call status to display percentage of the current frame done.
References DD::Image::Op::progressFraction().
|
protected |
Open the output file. This file is created with a temporary name so that the original file is not replaced until the write is successful. This returns false and calls geo->error() if it can't open the file.
References file, filename(), geo, DD::Image::WriteGeo::internalError(), offset, and strlcpy().
|
protected |
Close the output file. If there have not been any errors this will mv the temporary file to the correct place.
References DD::Image::Op::aborted(), file, filename(), geo, DD::Image::WriteGeo::internalError(), and strlcpy().
|
protected |
|
protected |
|
protected |
Move the write pointer to offset. This is done efficiently if the pointer is already at that point. Calls geo->error() on any errors and returns false. Returns true on success.
References file, geo, DD::Image::WriteGeo::internalError(), and offset.
Referenced by write().
|
inlineprotected |
Returns where the pointer currently is.
|
virtual |
Set the frame number to n.
|
virtual |
Write the data in geo->input0(). The frame number may be retrieved with frame() and the filename from filename(). This may call geo->error() with any error messages.
References DD::Image::Op::debug(), and geo.
|
virtual |
Return true if the destination can have an animation. If this is true then the writer is capable of writing objects with animation, and frame() and execute() may be called multiple times to write different objects. The default version returns false.
Referenced by DD::Image::WriteGeo::_close(), DD::Image::WriteGeo::endExecuting(), and DD::Image::WriteGeo::execFrameMode().
|
virtual |
Lets a writer override the Op::split_input() method of the including WriteGeo op. This is used by Writers that can write more than one view.
Referenced by DD::Image::WriteGeo::execViewMode(), and DD::Image::WriteGeo::split_input().
|
virtual |
Override if the writer needs to do something to finish a sequence. This is mostly of use by animation writers that don't close out the destination on a frame-by-frame basis.
Referenced by DD::Image::WriteGeo::endExecuting().
|
override |
Like the Op::knobs() method, this allows the Writers to create format-specific knobs for format-specific parameters. At present, the Writers are tasked with adding the knobs themselves after the 'file_type' knob of the parent Write.
|
override |
Like the Op::knob_changed() method, this allows the Writers to handle changes in their own parameters.
©2024 The Foundry Visionmongers, Ltd. All Rights Reserved. |