OLD | NEW |
1 //-***************************************************************************** | 1 //-***************************************************************************** |
2 // | 2 // |
3 // Copyright (c) 2009-2010, | 3 // Copyright (c) 2009-2010, |
4 // Sony Pictures Imageworks, Inc. and | 4 // Sony Pictures Imageworks, Inc. and |
5 // Industrial Light & Magic, a division of Lucasfilm Entertainment Company Ltd. | 5 // Industrial Light & Magic, a division of Lucasfilm Entertainment Company Ltd. |
6 // | 6 // |
7 // All rights reserved. | 7 // All rights reserved. |
8 // | 8 // |
9 // Redistribution and use in source and binary forms, with or without | 9 // Redistribution and use in source and binary forms, with or without |
10 // modification, are permitted provided that the following conditions are | 10 // modification, are permitted provided that the following conditions are |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 IObjectDrw::setTime( iSeconds ); | 86 IObjectDrw::setTime( iSeconds ); |
87 if ( !valid() ) | 87 if ( !valid() ) |
88 { | 88 { |
89 m_drwHelper.makeInvalid(); | 89 m_drwHelper.makeInvalid(); |
90 return; | 90 return; |
91 } | 91 } |
92 | 92 |
93 // Use nearest for now. | 93 // Use nearest for now. |
94 ISampleSelector ss( iSeconds, ISampleSelector::kNearIndex ); | 94 ISampleSelector ss( iSeconds, ISampleSelector::kNearIndex ); |
95 ISubDSchema::Sample psamp; | 95 ISubDSchema::Sample psamp; |
96 m_subD.getSchema().get( psamp, ss ); | 96 if ( m_subD.getSchema().getNumSamples() > 0 ) |
| 97 { |
| 98 m_subD.getSchema().get( psamp, ss ); |
| 99 } |
97 | 100 |
98 // Get the stuff. | 101 // Get the stuff. |
99 V3fArraySamplePtr P = psamp.getPositions(); | 102 V3fArraySamplePtr P = psamp.getPositions(); |
100 Int32ArraySamplePtr indices = psamp.getFaceIndices(); | 103 Int32ArraySamplePtr indices = psamp.getFaceIndices(); |
101 Int32ArraySamplePtr counts = psamp.getFaceCounts(); | 104 Int32ArraySamplePtr counts = psamp.getFaceCounts(); |
102 | 105 |
103 // Update the mesh hoo-ha. | 106 // Update the mesh hoo-ha. |
104 m_drwHelper.update( P, V3fArraySamplePtr(), | 107 m_drwHelper.update( P, V3fArraySamplePtr(), |
105 indices, counts ); | 108 indices, counts ); |
106 | 109 |
(...skipping 18 matching lines...) Expand all Loading... |
125 { | 128 { |
126 return; | 129 return; |
127 } | 130 } |
128 | 131 |
129 m_drwHelper.draw( iCtx ); | 132 m_drwHelper.draw( iCtx ); |
130 | 133 |
131 IObjectDrw::draw( iCtx ); | 134 IObjectDrw::draw( iCtx ); |
132 } | 135 } |
133 | 136 |
134 } // End namespace SimpleAbcViewer | 137 } // End namespace SimpleAbcViewer |
OLD | NEW |