Example #1
0
 void CreateMatrixOp(OpRcPtrVec & ops,
                     const float * m44,
                     TransformDirection direction)
 {
     float offset4[4] = { 0.0f, 0.0f, 0.0f, 0.0f };
     CreateMatrixOffsetOp(ops, m44, offset4, direction);
 }
Example #2
0
 void CreateSaturationOp(OpRcPtrVec & ops,
                         float sat,
                         const float * lumaCoef3,
                         TransformDirection direction)
 {
     float matrix[16];
     float offset[4];
     MatrixTransform::Sat(matrix, offset,
                          sat, lumaCoef3);
     
     CreateMatrixOffsetOp(ops, matrix, offset, direction);
 }
Example #3
0
 void CreateFitOp(OpRcPtrVec & ops,
                  const float * oldmin4, const float * oldmax4,
                  const float * newmin4, const float * newmax4,
                  TransformDirection direction)
 {
     float matrix[16];
     float offset[4];
     MatrixTransform::Fit(matrix, offset,
                          oldmin4, oldmax4,
                          newmin4, newmax4);
     
     CreateMatrixOffsetOp(ops, matrix, offset, direction);
 }
Example #4
0
 void BuildMatrixOps(OpRcPtrVec & ops,
                     const Config& /*config*/,
                     const MatrixTransform & transform,
                     TransformDirection dir)
 {
     TransformDirection combinedDir = CombineTransformDirections(dir,
         transform.getDirection());
     
     float matrix[16];
     float offset[4];
     transform.getValue(matrix, offset);
     
     CreateMatrixOffsetOp(ops,
                          matrix, offset,
                          combinedDir);
 }
Example #5
0
 void CreateScaleOffsetOp(OpRcPtrVec & ops,
                          const float * scale4, const float * offset4,
                          TransformDirection direction)
 {
     float m44[16];
     memset(m44, 0, 16*sizeof(float));
     
     m44[0] = scale4[0];
     m44[5] = scale4[1];
     m44[10] = scale4[2];
     m44[15] = scale4[3];
     
     CreateMatrixOffsetOp(ops,
                          m44, offset4,
                          direction);
 }
Example #6
0
        void LocalFileFormat::BuildFileOps(OpRcPtrVec & ops,
                                      const Config& /*config*/,
                                      const ConstContextRcPtr & /*context*/,
                                      CachedFileRcPtr untypedCachedFile,
                                      const FileTransform& fileTransform,
                                      TransformDirection dir) const
        {
            LocalCachedFileRcPtr cachedFile = DynamicPtrCast<LocalCachedFile>(untypedCachedFile);

            if(!cachedFile) // This should never happen.
            {
                std::ostringstream os;
                os << "Cannot build SpiMtx Ops. Invalid cache type.";
                throw Exception(os.str().c_str());
            }

            TransformDirection newDir = CombineTransformDirections(dir,
                fileTransform.getDirection());

            CreateMatrixOffsetOp(ops,
                                 cachedFile->m44,
                                 cachedFile->offset4,
                                 newDir);
        }