HDK
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
ScalarPropertyWriter.h
Go to the documentation of this file.
1
//-*****************************************************************************
2
//
3
// Copyright (c) 2009-2011,
4
// Sony Pictures Imageworks, Inc. and
5
// Industrial Light & Magic, a division of Lucasfilm Entertainment Company Ltd.
6
//
7
// All rights reserved.
8
//
9
// Redistribution and use in source and binary forms, with or without
10
// modification, are permitted provided that the following conditions are
11
// met:
12
// * Redistributions of source code must retain the above copyright
13
// notice, this list of conditions and the following disclaimer.
14
// * Redistributions in binary form must reproduce the above
15
// copyright notice, this list of conditions and the following disclaimer
16
// in the documentation and/or other materials provided with the
17
// distribution.
18
// * Neither the name of Sony Pictures Imageworks, nor
19
// Industrial Light & Magic nor the names of their contributors may be used
20
// to endorse or promote products derived from this software without specific
21
// prior written permission.
22
//
23
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
24
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
25
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
26
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
27
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
28
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
29
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
30
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
31
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
32
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
33
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34
//
35
//-*****************************************************************************
36
37
#ifndef Alembic_AbcCoreAbstract_ScalarPropertyWriter_h
38
#define Alembic_AbcCoreAbstract_ScalarPropertyWriter_h
39
40
#include <
Alembic/Util/Export.h
>
41
#include <
Alembic/AbcCoreAbstract/Foundation.h
>
42
#include <
Alembic/AbcCoreAbstract/BasePropertyWriter.h
>
43
44
namespace
Alembic {
45
namespace
AbcCoreAbstract {
46
namespace
ALEMBIC_VERSION_NS
{
47
48
//-*****************************************************************************
49
//! A Scalar Property is a Rank 0 property which has a single value for each
50
//! sample. This is distinguished from an Array Property, which has a
51
//! variable number of elements per sample, and requires more sophisticated
52
//! resource management.
53
class
ALEMBIC_EXPORT
ScalarPropertyWriter
54
:
public
BasePropertyWriter
55
{
56
public
:
57
//! Virtual destructor
58
//! ...
59
virtual
~
ScalarPropertyWriter
();
60
61
//-*************************************************************************
62
// NEW FUNCTIONS
63
//-*************************************************************************
64
65
//! Sets a sample.
66
//!
67
//! For specifying the sample, this takes a void pointer which
68
//! points to the beginning of the memory corresponding to the scalar.
69
//!
70
//! For String and Wstring, the const void *iSamp is assumed to be
71
//! static_castable to const std::string * and const std::wstring *,
72
//! respectively.
73
//!
74
//! The data passed into this function will be used or copied locally
75
//! by this function, and need not live (in the calling context)
76
//! outside the return scope of this function call.
77
virtual
void
setSample(
const
void
*iSamp ) = 0;
78
79
//! Simply copies the previously written sample's value.
80
//! This is an important feature.
81
virtual
void
setFromPreviousSample() = 0;
82
83
//! Return the number of samples that have been written so far.
84
//! This changes as samples are written.
85
virtual
size_t
getNumSamples() = 0;
86
87
//! Changes the TimeSampling used by this property.
88
//! If the TimeSampling is changed to Acyclic and the number of samples
89
//! currently set is more than the number of times provided in the Acyclic
90
//! TimeSampling, an exception will be thrown.
91
virtual
void
setTimeSamplingIndex( uint32_t iIndex ) = 0;
92
};
93
94
}
// End namespace ALEMBIC_VERSION_NS
95
96
using namespace
ALEMBIC_VERSION_NS
;
97
98
}
// End namespace AbcCoreAbstract
99
}
// End namespace Alembic
100
101
#endif
102
Export.h
ALEMBIC_EXPORT
#define ALEMBIC_EXPORT
Definition:
Export.h:51
BasePropertyWriter.h
Foundation.h
Alembic::AbcCoreAbstract::ALEMBIC_VERSION_NS::BasePropertyWriter
Definition:
BasePropertyWriter.h:56
Alembic::AbcCoreAbstract::ALEMBIC_VERSION_NS::ScalarPropertyWriter
Definition:
ScalarPropertyWriter.h:53
ALEMBIC_VERSION_NS
#define ALEMBIC_VERSION_NS
Definition:
Foundation.h:88
Alembic
AbcCoreAbstract
ScalarPropertyWriter.h
Generated on Wed Nov 13 2024 02:43:46 for HDK by
1.8.6